How to install Django in your PC?

Django is a Python Web Framework. Basically Django is a open-source for backend web applications and it contains various library functions of python which is used for designing the backend part of your web development. It enables rapid development of secure and maintainable websites. Built by experienced developersDjango takes care of much of the hassle of web development, so you can focus on writing your app without needing to reinvent the wheel.

 
So, Now I am going to tell you how to install Django in your system:-
 
Step 1: First of all, you need to have python installed in your system and python version should be 3.4 or more than that. If python is not installed in your then go through this link https://www.python.org/downloads/windows/  and install it . Now, python latest version is python 3.8. Before installation, you must check for your system requirement whether your system has 32 bit or 64-bit operating system. Then install it.
 

Step 2: After that you need to setup for python, run the python installer from your downloaded folder. And make sure to mark Add Python 3.8 to PATH , otherwise you need to do it explicitly.

install django
Step 3: To verify for python version you have installed, open you command prompt(i.e. cmd) and write $ python –version . And make sure your python version should be more than 3.4.
 
Step 4: Before installing Django, it’s recommended to install Virtualenv that creates new isolated environments to isolates your Python files on a per-project basis. This will ensure that any changes made to your website won’t affect other websites you’re developing.
 
So, to install virtual environment in your system, open cmd and write 
pip install virtualenvwrapper-win 
This will not provide you environment, this will only install the environment wrapper.
install virtual environment
Step 5: So, to create a virtual environment, you need to write command 
mkvirtualenv test , instead of test you can write anything you want.
 
 
Step 5: Then install Django by writing the command as: $ pip install django 
To check for django version, you should write the command as: 
django-admin –version .
 
Step 6: Let say you want to deactivate your virtual environment, then simply type ‘deactivate’ to deactivate your environment.  Or else you can simply close your command prompt will directly deactivate it for you. 
So to activate your virtual environment in again in command prompt, then simply write this command $ workon test . It will activate your virtual environment .
 

Then you can start your  Django project .

Hope it will help you installing Django successfully.

Leave a Comment