βοΈ Django Install β Step-by-Step Guide (2025)
π§² Introduction β Why Install Django?
Django is one of the most popular Python web frameworks for building scalable, secure, and maintainable websites. Installing Django properly is the first step toward developing powerful web applications.
π― In this guide, youβll learn:
- How to install Django via
pip - How to install Django globally or in a virtual environment
- How to check and verify your Django installation
π οΈ Step 1: Check Python & pip
Before installing Django, confirm Python and pip are installed.
$ python --version
$ pip --version
You should see Python 3.6+ and pip 20+.
π Step 2: (Recommended) Create a Virtual Environment
$ python -m venv env
$ source env/bin/activate # macOS/Linux
# OR
> env\Scripts\activate # Windows
Once activated, you’ll see (env) in your terminal prompt.
π¦ Step 3: Install Django via pip
Inside the activated environment, run:
(env) $ pip install django
To install a specific version:
(env) $ pip install django==4.2.7
To upgrade:
(env) $ pip install --upgrade django
π§ͺ Step 4: Verify Installation
Run the following command:
(env) $ django-admin --version
β
If you see a version number like 4.2.7, Django is installed correctly.
π Step 5: Start a Django Project
(env) $ django-admin startproject mysite
$ cd mysite
$ python manage.py runserver
Visit http://localhost:8000 β You should see the Django welcome page.
π Summary β Recap & Next Steps
π Key Takeaways:
- Use a virtual environment for isolated Django installs.
- Install Django via
pipinside your venv. - Verify installation with
django-admin --version. - Use
startprojectto begin development.
βοΈ Real-World Relevance:
Installing Django sets up your dev environment for scalable, production-ready web apps. It also prepares you for integrating databases, admin panels, APIs, and frontend tools.
β Frequently Asked Questions (FAQ)
β How do I install Django globally?
β Use:
$ pip install django
However, global installation is not recommended. Prefer using a virtual environment.
β How do I install a specific Django version?
β Use:
$ pip install django==3.2
This helps ensure compatibility with existing projects.
β How can I upgrade to the latest version of Django?
β Run:
$ pip install --upgrade django
β How do I uninstall Django?
β Run:
$ pip uninstall django
β What’s the difference between django-admin and manage.py?
β
django-admin is a global tool.
β
manage.py is project-specific and includes your settings.
β What are the system requirements for Django?
- Python 3.8 or later
- pip
- Optional: virtualenv for environment isolation
Let me know if youβd like a Docker-based installation guide or pip requirements file next!
Share Now :