How To Install Python and Django On Linux

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.

  1. Login to your Linux server via SSH.
  2. Once logged in, you will want to run the following command to install Python 3.6 depending on your Linux distribution.
    • Debian:
       
    • CentOS:
       
  3. 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.
  4. 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.

  1. Log in via SSH to your server.
  2. After you have logged in, you will want to enter in these commands to get that installed.
     
  3. 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.

  1. Log into your server via SSH.
  2. Type this command to start the installation of Django:
     
  3. 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, on our Phones, or by submitting a ticket with our Technical Support team.


Share:

Leave a Reply