How to Install Python and Django on Windows machine? Step-By-Step with Screenshots
The famous web framework for Python is Django, which helps the programmers with rapid development capability and clean practical design. It has standard components available to enable developers to create/build complex websites in a fast and easy way.
For the beginners, I am attaching here the Step-By-Step guide, as how to install/configure Python 3.7 and Django 2.2 on windows machine. In my next guide, I shall try to show, how to develop a simple website very easily and quickly using Python Django web framework.
Step-1: First download python 3.X:
Download Link: https://www.python.org/downloads/release/python-373/
Step-2: Double click the downloaded file (i.e. pthon-3.7.3.exe in this case) and click “Install Now” and select the “Add Python 3.7 to Path” checkbox.
Step-3: Check if python is successfully installed: “python –version”,
Step-4: Check if pip is successfully installed: “pip –version”
Step-5: Install Virtual Environment using command: ”pip install virtualenvwrapper-win”
Step-6: Make virtual environment using command: “mkvirtualenv mywebsite1”
Step-7: Activate your new virtual environment using command: “workon mywebsite1”
Step-8: Install Django using pip command: “pip install django”
Step-9: To check, as if the django version is successfully installed:
“python –m django –version”
Step-10: Create project directory: “mkdir myprojects” and then “cd myprojects”
Step-11: Start project, using command: “django-admin startproject mywebsiteproject” and then “cd mywebsiteproject”
Step-12: Run the python server: “python manage.py runserver”
Step-13: To check, type “http://127.0.0.1:8000” in the browser and following screen will show:
================