How to Install Django: Step-by-Step Guide
Django is a powerful Python web framework for building secure, scalable, feature-rich apps. This guide walks you through installation, virtual environments, and creating your first Django project ÔÇö start to finish.
Complete Python Course:-
Complete Advance AI topics:-
Step 1: Check Prerequisites
Django requires Python 3.6 or later. Check your Python version:
python --version
# or
python3 --version
If Python is not installed, download it from python.org.
Step 2: Verify pip
pip --version
# or pip3 --version
Step 3: Create a Virtual Environment
Virtual environments isolate project dependencies ÔÇö avoiding conflicts.
python -m venv env
# Activate on Windows
envScriptsactivate
# Activate on Mac/Linux
source env/bin/activate
Step 4: Install Django
pip install django
# Verify
django-admin --version
Step 5: Create Your First Project
django-admin startproject myproject
cd myproject
Step 6: Run the Development Server
python manage.py runserver
# Open: http://127.0.0.1:8000/
Step 7: Install Optional Packages
pip install djangorestframework # for REST APIs
pip install pillow # for image fields
pip install django-environ # for env variables
Step 8: Deactivate the Virtual Environment
deactivate
Download New Real Time Projects:- Click here
Conclusion
Django setup is straightforward ÔÇö Python + pip + venv + django package + startproject. With your dev server running on port 8000, you are ready to build. For more guides, stay tuned to .
how to install django
django install windows
django install python 3
install django mac
django pip install
django virtualenv
django setup tutorial
django installation guide