When building your site, you will need to pick a language to code the site in. Especially if you are the one who will be developing the site. A popular choice nowadays is to use Python and Django to build your site. Many popular sites have used this as well, and it works out great for them. This guide will go into how you can install Python, as well as Django through the use of the pip installer.
How To Install Python
Depending on your distribution of Linux, the way you install python may be different. Though the only major difference would be the package manager that is used to install it. This guide will focus on primarily CentOS and Debian.
- Login to your Linux server via SSH.
- Once logged in, you will want to run the following command to install Python 3.6 depending on your Linux distribution.
apt-get install python36
yum install python36 -y
- After running, the above command, Python should start to install. It might take a little while for it to do that, as Python is quite feature rich.
- To test if Python has been installed successfully, you can simply type python into the command line. This will open the Python interpreter if installed. If that works, you can exit the Python interpreter by typing exit().
How To Install PIP
Since we will be using pip to install Django on the server, we are going to install that now if it is not already installed.
- Log in via SSH to your server.
- After you have logged in, you will want to enter in these commands to get that installed.
curl https://bootstrap.pypa.io/get-pip.py -o pip-installation.py python pip-installation.py
- It might take a few moments for that to install, but once installed, you can test to see if it was successful by checking the version number. If the command below does not return an error that the command does not exist, the installation was successful.
How To Install Django
Now for the last part of this guide, to install Django. These steps should be pretty universal, as it would be using only pip to install it.
- Log into your server via SSH.
- Type this command to start the installation of Django:
pip install django
- The installation will take a couple moments to complete. Though once it does, pip will display a successful message, indicated that the installation completed favorably.
Once that has completed, you are now ready to begin using Django. There are various things that you can do using Django, and the options are endless.
If you should have any questions or would like assistance, do feel free to contact us through Live Chat or by submitting a ticket with our Technical Support team.