< Prev
Next >

How to Download and Install Django Framework

To create a web application using the Django Framework, we first need to download and install its latest stable release(a stable version). At the time of writing this article, the latest release of Django Framework is 2.2.2, which could be downloaded from its website.


Before we download and install Django Framework, we will have to install Python because Django is a Python web framework and it needs Python to be installed on the system before we could make web applications using the Django Framework.

Django requires Python 2.3 or higher version. For those who don't know how to install Python, please refer to our tutorial - How to download and install Python Latest Version 3.7.3 but for those who have already got the Python installed, please continue with this tutorial.

Once, Python has been installed and configured, let us see the steps to download, install and configure the Django Framework.

  1. To download and install the latest release of Django Framework, you have to open the Django Framework website and click on the Download button on the website, as shown in the picture below.

  2. Figure 1

  3. Clicking on the download button takes you to a new webpage, which recommends you to install the Django Framework with pip. The pip is a package manager for Python, which is used to install and uninstall software packages written in Python with ease and one of these packages is Django Framework.

    The setup file of pip is written in Python and to install the pip on your system, we will first have to visit the website Get pip, which opens the setup file(written in Python). Please, save this file in your system with the name of your choice, we have saved it with the name get-pip with .py extension(because it is a Python file).

  4. Next, we have to execute the saved setup file on the command prompt and because the setup file of pip is just a normal Python file with .py extension, so you would execute it just like executing any general python program, as shown in the picture below.

    Figure 2

    As you can see in the picture just above, we have executed the setup file of pip saved on system with the name get-pip with .py extension. Doing so, has successfully installed pip on our system.

  5. Next, we can install a dedicated virtual environment for the Django web application that you are going to create in the future. Though this is not required step but it will be useful and save you some time in the future when you wish to deploy your web application project created in Django.

    To install such dedicated virtual environment, you may type in the following command at the command prompt.

    py -m pip install virtualenvwrapper-win

    Doing so, will successfully install a dedicated virtual environment for deploying the Django web applications that you are going to create in the future.

    Figure 3

  6. As we have successfully downloaded and installed pip, let us download and install Django Framework by using pip. To do that, we will have to type in the following command at the command prompt.

    py -m pip install Django

    Doing so, will successfully download and install the Django Framework, as shown in the picture below.

    Figure 4

    As you can see a couple of warnings in the last picture, telling us that a few important scripts in the directory - Scripts within our Python installation directory should be on the Path. So, all we have to do is to just append the path to this directory to the system variables Path, by clicking on -
    • Computer --> System Properties --> Advanced System Settings.
    • In the Advanced tab, click the Environment variables button.
    • Next, In the section of System Variables find the variable - Path and click on the Edit... button.
    • Next, append the path to the Scripts directory(within our Python installation) on your system and please don't forget to add a semicolon; at the beginning of this path, only if there was no semicolon; at the end of the last variable.
    • Click OK. Restart the Command Prompt to reflect the applied changes.

  7. After downloading and installing the Django Framework, let us validate its successful installation by typing the following command on the command prompt.

    django-admin --version

    Doing so, shows us the version of Django Framework installed on our system i.e. 2.2.2 version.

    Figure 5

    This concludes the successful download, installation and configuration of Django Framework. Have you liked the tutorial? Yes? then please, share it or please like our social media channels. Thank you!

    Please share this article -


Please Subscribe

Please subscribe to our social media channels for daily updates.

Decodejava Facebook Page  DecodeJava Twitter Page Decodejava Google+ Page



Please check our latest addition