Need help? Chat now!
Search results for:
Table of Contents
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 and Django through the use of the pip installer.
Depending on your distribution of Linux, the way you install python may be different. However, the only major difference would be the package manager that is used to install it. This guide will focus primarily on 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 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:
Since we will be using pip to install Django on the server, we will 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 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 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.
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 of moments to complete. Though once it does, pip will display a successful message, indicating that the installation completed favorably.
Once that has been 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, please contact us through Live Chat or by submitting a ticket with our Technical Support team.
Written by Hostwinds Team / May 1, 2018