pip | LinuxHostSupport Linux Tutorials and Guides Wed, 02 May 2018 16:02:52 +0000 en-US hourly 1 https://wordpress.org/?v=6.6.1 How to Install or Upgrade Django Using Pip https://linuxhostsupport.com/blog/how-to-install-or-upgrade-django-using-pip/ https://linuxhostsupport.com/blog/how-to-install-or-upgrade-django-using-pip/#respond Wed, 02 May 2018 08:24:28 +0000 https://linuxhostsupport.com/blog/?p=536 We will show you how to install or upgrade Django using pip on a Linux VPS. Django is a free and open-source web framework based on Python and follows the model-view-template (MVC) architectural pattern. Django is build by experienced web developers and encourages rapid development and clean, pragmatic design. Using Django, you can develop full […]

The post How to Install or Upgrade Django Using Pip appeared first on LinuxHostSupport.

]]>
We will show you how to install or upgrade Django using pip on a Linux VPS. Django is a free and open-source web framework based on Python and follows the model-view-template (MVC) architectural pattern. Django is build by experienced web developers and encourages rapid development and clean, pragmatic design. Using Django, you can develop full fledged database-driven websites in Python. The framework takes care of advanced tasks like user authentication, content administration, sitemaps etc. Moreover, you can use clean and elegant URL scheme for your web application. Django is one of the most popular web server frameworks and in this tutorial we are going to show you how to install or upgrade Django using pip on a Linux VPS.

Prerequisites for Django

Django requires Python, so in order to be able to run Django on your server, you need to install Python on your server. Python 3 is recommended. Also, you can use MySQL/MariaDB, PostgreSQL or SQLite as a database engine along with Django to store the data.

Connect to your Linux server via SSH

To install or update Django using pip you need to have SSH access to the server. Connect to your server via SSH and make sure you have Python installed on your server:

python -V

Or if you are willing to use Python 3 for your Django project

python3 -V

Install Django on a Linux VPS

First of all, you have to install pip on your server. To install pip on an Ubuntu 16.04 VPS, run the following commands:

apt-get update
apt-get install python3-pip

CentOS 7 comes with Python 3.4 by default, so to install pip on CentOS 7 VPS, run the following command:

yum install python34-pip

In case you already have pip installed on your Linux server, you can upgrade it using the following commands:

On Ubuntu 16.04, run the following command:

pip3 install --upgrade pip

On CentOS 7, run the following command:

pip3.4 install --upgrade pip

Next step is to install and set up the Python Django package:

On Ubuntu 16.04, run the following command:

pip3 install django

On CentOS 7, run the following command:

pip3.4 install django

Now you have the Django package installed on your server. You can start a new Django project using the django-admin command. For example:

django-admin startproject newapp

The command will generate new Django application called newapp which you can use for your next project. For more information about how to get started with Django it is recommended to refer to the official Django documentation.

Update Django using pip on a Linux VPS

First, you should determine the Django version which is currently installed on your server.

On Ubuntu 16.04, run the following command:

pip3 list | grep -i django

On CentOS 7, run the following command:

pip3.4 list | grep -i django

If you want to update the Django package using pip on your Linux server you can use the following commands:

On Ubuntu 16.04:

pip3 install --upgrade django

On CentOS 7:

pip3.4 install --upgrade django

Also, pip allows you to install specific Django version. You can do so by specifying the Django version while installing/upgrading the package. For example, to install Django 1.11.12 which is the latest release from the 1.11 LTS release, you can do the following:

On Ubuntu 16.04, run the following command:

pip3 install django==1.11.12

or if you are upgrading to that version, run the following command:

pip3 install --upgrade django==1.11.12

On CentOS 7, run the following command:

pip3.4 install django==1.11.12

or if you are upgrading to that version, run the following command:

pip3.4 install --upgrade django==1.11.12

As you can see, installing and upgrading Django using pip on a Linux server is a very easy task. You have to install Python and pip on the server and then install the Django package which will allow you to use the django-admin command to start new Django projects. If you wish to uninstall the Django package completely, you can use the following commands:

On Ubuntu 16.04, run the following command:

pip3 uninstall django

On CentOS 7, run the following command:

pip3.4 uninstall django

This will not remove any of your existing projects. It will only remove the Django package installed by pip.

Of course, you don’t have to install or upgrade Django using pip on a Linux VPS, if you use one of our Linux Support Services, in which case you can simply ask our expert Linux admins to install or upgrade Django using pip for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post on how to install or upgrade Django using pip on a Linux VPS, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

The post How to Install or Upgrade Django Using Pip appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-or-upgrade-django-using-pip/feed/ 0
Install SciPy through pip https://linuxhostsupport.com/blog/install-scipy-through-pip/ https://linuxhostsupport.com/blog/install-scipy-through-pip/#respond Tue, 28 Feb 2017 13:31:24 +0000 https://linuxhostsupport.com/blog/?p=31 SciPy (pronounced “Sigh Pie”) is an open-source Python-based package of tools mainly used for scientific computing, mathematics and engineering. It is built on the Numpy extension of Python and it has a lot of useful modules for statistics, integration, optimization, linear algebra, Fourier transforms, signal and image processing, ODE solvers, and many more. SciPy runs on […]

The post Install SciPy through pip appeared first on LinuxHostSupport.

]]>
SciPy (pronounced “Sigh Pie”) is an open-source Python-based package of tools mainly used for scientific computing, mathematics and engineering. It is built on the Numpy extension of Python and it has a lot of useful modules for statistics, integration, optimization, linear algebra, Fourier transforms, signal and image processing, ODE solvers, and many more. SciPy runs on all major Linux based operating systems and its installation is quick and very easy. In this tutorial we will guide you through the steps of installing SciPy on a Linux VPS using the pip package manager.

SciPy is very well organized into sub-packages covering different scientific computing domains. These are summarized in the following list:

  • cluster – Clustering algorithms
  • constants – Physical and mathematical constants
  • fftpack – Fast Fourier Transform routines
  • integrate – Integration and ordinary differential equation solvers
  • interpolate – Interpolation and smoothing splines
  • io – Input and Output
  • linalg – Linear algebra
  • ndimage  – N-dimensional image processing
  • odr – Orthogonal distance regression
  • optimize  – Optimization and root-finding routines
  • signal – Signal processing
  • sparse – Sparse matrices and associated routines
  • spatial – Spatial data structures and algorithms
  • special – Special functions
  • stats – Statistical distributions and functions
  • weave  – C/C++ integration

To start the SciPy installation you have to log in to your Linux VPS as user root

ssh root@IP_Address -p <port_number>

Start a new screen session by executing the following command

screen -S scipy

Make sure that all installed packages on your server and up to date and install the package manager pip on your server if it is not already installed

CentOS/Fedora/RHEL

yum clean all
yum -y update
yum install -y python-pip

Ubuntu/Debian

apt-get update && apt-get upgrade
apt-get install python-pip

Once it is installed, update pip to the latest available version

pip install --upgrade pip

To check the currently installed version and confirm that pip is successfully installed on your server, run the following command:

pip -V

The output should be in the following format:

pip 9.0.1 from /usr/lib/python2.6/site-packages (python 2.6)

After pip is installed on your virtual server, you can go ahead and install SciPy:

pip install scipy

If the installation is completed successfully, you will receive the following output

Collecting scipy
Downloading scipy-0.18.1-cp27-cp27mu-manylinux1_x86_64.whl (40.3MB)
100% |################################| 40.3MB 20kB/s
Installing collected packages: scipy
Successfully installed scipy-0.18.1

Since Scipy is built on the Numpy Python extension and uses Numpy arrays and data types, so for all basic array handling needs you may use Numpy functions, for example:

import numpy as np
np.some_function()

The top level Scipy package is imported as sp by default:

import scipy as sp

For more information about SciPy, its features, functions, and usage please check their official documentation at https://docs.scipy.org/doc/scipy/reference/


Of course, you don’t have to do any of this if you use one of our Software Installation Services, in which case you can simply ask our expert Linux admins to install SciPy through pip for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

The post Install SciPy through pip appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/install-scipy-through-pip/feed/ 0