How to Install Django on a Windows PC


In this article, we show how to install Django on a Windows PC.

If you are using one of the latest versions of Python such as one of the version of Python 3, pip comes with the package. Therefore, you can install django through the pip install method. This is the easiest way of installing django.

So this is the way we will install django. It's very easy, so just follow these steps.

Open the Command Prompt on Windows

This is shown below.

Windows Command Prompt

When you first open the command prompt, you may see a screen, such as the one shown below.

Windows Command Prompt when first opening

You cannot install django based on this current directory that we have. You have to go to the Python folders, specifically the Scripts Python folder. Therefore, in order to install django, we have to first change the directory.

In windows, we can change the directory through the chdir function. After the chdir function, we place the full path to the Python folder we can install django through.

The complete path to this folder on my computer is, C:\\Users\\David\\AppData\\Local\\Programs\\Python\\Python36-32\\Scripts

Therefore, I enter into the command prompt, chdir C:\\Users\\David\\AppData\\Local\\Programs\\Python\\Python36-32\\Scripts

This is shown below.

Windows Command Prompt chdir (change directory) function

Find the full path to the Scripts folder on your computer and enter it in, like you see above.

After this, we can now install django.

We do this through the line, pip install django.

This is shown below.

Windows Command Prompt installing django

Once you see, successfully installed, then you know that you have django now.

If you now open the Scripts folder, then you will see django-admin.exe and

This is shown below.

Django files

And this is it. You now have django and can use this web framework to put up python code on the web.

Related Resources

HTML Comment Box is loading comments...