How to install Django python framework in windows 10

We know Django is the most popular python framework ,it only work with python installed system,before starting Django we should install python.So lets see how to install python in windows 10. Fortunately installing python is so easy

Step 1)

Install python in windows 10

First you need to get the python installer,as of now latest python version that support Django is Python 3.6.7. Go to https://www.python.org/downloads/ and Download Python 3.6.7 and install don’t forget to tick add python 3.6 tp PATH,it will assign PATH variable

python-Django-step1

Step 2)

Check python installed successfully

open CMD in windows

c:/users>python
will respond like below
Python 3.6.7 (v3.6.7:6ec5cf24b7, Oct 20 2018, 13:35:33) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

python-Django-step2

Step 3)

install pip if not installed in your system

D:\my_project >

Step 4)

Create a project directory, you can create project directory anywhere in your system,here we are created in D drive with name my_project
then move current directory to project directory in CMD

D:\my_project >


Step 5)

Install virtual environment using pip
D:\my_project>pip install virtualenv

Create a virtual environment with name env_mysite you can rename anything as per your reference

D:\my_project>virtualenv env_mysite

install django in windows 10

Step 6)

Activate virtualenv
D:\my_project>env_mysite\scripts\activate

env_mysitePS D:\my_project>

Step 7)

Install django

env_mysitePS D:\my_project>pip install "django>=2.1,<2.2"

Step 8)

Create A New project

env_mysitePS D:\my_project>django-admin startproject myweb_site

Step 9)

Change Directory

env_mysitePS D:\my_project>Cd myweb_site

Step 10)

Run developemnt server

env_mysitePS D:\my_project> python manage.py runserver 

install-django-in-windows-10-step9

Finshed

Open http://127.0.0.1:8000/ in any browsers

install-django-in-windows-10-step-1

Congratulation you have installed Python django framework
Note:
Update latest changes in djnago

python manage.py makemigrations

python manage.py migrate

How to create a small project using Django

See All answers

  1. I have read so many articles about the blogger lovers but this paragraph is actually a good
    piece of writing, keep it up.

  2. Hello. I have checked your tutorialshore.com and i see you’ve got some good content so probably it is the reason that you rank high in google. keep writing thank you for “How to install Django python framework in windows 10” it helped to learn django .

  3. hi, thanks for this steps. just checking about the step 5 and 6, after virtualenv installed virtualevn env_mysite showing “‘virtualenv’ is not recognised as an internal or external command” message. is there any other steps prior to this that i need to ran? thanks

My Thought

Your email address will not be published. Required fields are marked *

Our Tool : hike percentage calculator