Django Installation and Setup
Last Updated :
06 Oct, 2025
Installing and setting up Django is a straightforward process. Below are the step-by-step instructions to install Django and set up a new Django project on your system.
Before installing Django, make sure you have Python installed on your system.
How to Install Django?
To Install Django in Linux and Mac is similar, here I am showing it in Windows for Linux and Mac just open the terminal in place of the command prompt and go through the following commands.
Step 1: Install Pip
Open the command prompt and enter the following command-
python -m pip install -U pip
Install PipStep 2: Set Virtual environment
Setting up the virtual environment will allow you to edit the dependency which generally your system wouldn't allow. Follow these steps to set up a virtual environment-
Step 3: Create virtual environment in Django
We should first go the directory where we want to create the virtual environment then we type the following command to create virtual environment in django.
python -m venv env_site
Create Virtual Environmentthen we need to activate virtual environment in django
Step 4: Activate the virtual environment
Run the activation script located in the bin directory within the virtual environment folder
.\env_site\Scripts\activate.ps1
source env_site/bin/activate
Step 5: Install Django
Install django by giving following command
pip install django
Install DjangoDjango Setup
Once Django is installed, we can start to create a new Django project.
Step 1: Start a new Django Project
Start a project by following command-
django-admin startproject geeks_site
Start a new Project DjangoStep 2: Navigate to the Project Directory
Change directory to geeks_site
cd geeks_site

Step 3: Start the server
Start the server by typing following command in cmd-
python manage.py runserver
Start Django ServerStep 4: Verify Server Status
To check whether server is running or not go to web browser and enter http://127.0.0.1:8000/ as URL.

Explore
Python Fundamentals
Python Data Structures
Advanced Python
Data Science with Python
Web Development with Python
Python Practice