Find by Category

How to install Django 2.1.7 on Windows 10

How to install django 2 on windows 10/8/7. So, in order to install Django 2 , you need to have python installed already on your operating system.

Download & Install Python

Follow this python download link to download & install the latest version of python on your windows 10/8/7 operating system.

Verify python & pip installation with command prompt

python --version
python -V

pip --version
pip list

Let’s create virtual environment on Windows 10

Launch your command prompt, without changing the directory run the commands below

pip install virtualenvwrapper-win
mkvirtualenv env_name

Now, close the command prompt and relaunch it to activate the python environment, run the following command

workon env_name

After installing python, pip and virtual environment wrapper on Windows OS, we created the virtual environment and activated it. Now, let’s install the django 2 on Windows 10.

Stay in the activated python virtual environment, run the following command to install latest version of django

pip install django

Let’s create our first Django app

From the activated virtual environment, run these following the command to create django project, change directory into the django project, run the django development server, and load the app on the browser.

djnago-admin startproject project_name
cd project_name

To run django development server

python runserver

Now, launch your preferred browser, and navigate to http://localhost:8000

django 2 on windows 10
Here is your Django 2 on Windows 10

2 thoughts on “How to install Django 2.1.7 on Windows 10”

  1. Hi, thanks for the tutorial. Unfortunately I cannot get Django installed on Windows 10.

    This command works: pip install virtualenvwrapper-win

    When I do: pip show virtualenvwrapper-win, I see that the package is installed.

    I have added python scripts directory to my path.

    When I try: “mkvirtualenv env_name” I get the following error:

    mkvirtualenv : The term ‘mkvirtualenv’ is not recognized as the name of a cmdlet, function, script file, or operable
    program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
    At line:1 char:1
    + mkvirtualenv env_name
    + ~~~~~~~~~~~~
    + CategoryInfo : ObjectNotFound: (mkvirtualenv:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

    I have tried everything I can think of.
    Any ideas?
    Kind regards,
    Joan Killeen

Comments are closed.