If you’re planning to build a web application using Python, you’ve probably heard of Django — one of the most powerful and beginner-friendly web frameworks out there. Django helps you build secure, scalable, and data-driven websites quickly, without reinventing the wheel.
In this guide, we’ll walk you through how to install Django on Windows 11, step by step. By the end, you’ll have a fully functional Django setup ready for development.
What You’ll Need Before You Start
Before installing Django, make sure you have a few prerequisites ready:
- Windows 11 PC
- Python (version 3.8 or newer)
- Command Prompt or Windows Terminal access
- An active internet connection
You don’t need anything else — Django installs through Python’s package manager (pip), which makes the setup super easy.
Step 1: Check if Python Is Installed
Django runs on Python, so the first step is to verify that Python is already installed on your system.
- Open Command Prompt (
Win + R, then typecmdand hit Enter). - Type:
python --version
If you see something like:
Python 3.12.1
then Python is already installed.
If not, download and install it from the official website: https://www.python.org/downloads/windows/
Tip: During installation, make sure to check the box that says “Add Python to PATH.”
Once Python is installed, verify that pip (Python’s package manager) is also available:
pip --version
If it shows a version number, you’re good to go.
Step 2: Upgrade pip (Optional but Recommended)
Before installing Django, it’s a good idea to make sure pip is up to date. Run this command:
python -m pip install --upgrade pip
You’ll see a short download process, and pip will be upgraded to the latest version.
Step 3: Create a Virtual Environment
While you can install Django globally, it’s best practice to create a virtual environment for each project. This keeps dependencies organized and prevents version conflicts between projects.
To create one:
- Navigate to the directory where you want your Django project to live, for example:
cd Desktop mkdir django_project cd django_project - Create a virtual environment:
python -m venv env - Activate it:
env\Scripts\activate
Once activated, your terminal prompt should look something like this:
(env) C:\Users\YourName\Desktop\django_project>
This means your virtual environment is active — any packages you install now will be contained within it.
Step 4: Install Django
Now that your environment is ready, install Django using pip:
pip install django
This command downloads and installs the latest version of Django from the Python Package Index (PyPI).
Once the installation completes, verify it by running:
django-admin --version
You should see something like:
5.1.2
That means Django was installed successfully!
Step 5: Create a New Django Project
Now let’s create your first Django project to make sure everything works correctly.
- In the same directory, run:
django-admin startproject mywebsite - Navigate into your project folder:
cd mywebsite - Run the Django development server:
python manage.py runserver
You should see output similar to:
Watching for file changes with StatReloader
Performing system checks...
System check identified no issues (0 silenced).
November 06, 2025 - 15:40:56
Django version 5.1.2, using settings 'mywebsite.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
Now open your browser and go to:
http://127.0.0.1:8000/
If you see the “Congratulations! You’ve successfully installed Django” page, you’re all set!
Step 6: Deactivate the Virtual Environment
When you’re done working, you can deactivate the virtual environment to return to your system’s default environment:
deactivate
The (env) prefix in your terminal will disappear, confirming that the environment has been turned off.
Step 7: (Optional) Install Django Globally
If you prefer not to use virtual environments and just want Django available system-wide, you can install it directly with:
pip install django
This makes Django available from any directory — though it’s not ideal for managing multiple projects with different dependency versions.
Step 8: (Optional) Verify Django Admin Commands
You can use the django-admin tool to manage and create new projects from anywhere.
For example:
django-admin startproject myapp
or view all available commands:
django-admin help
These commands are handy for quickly spinning up new projects or apps.
Step 9: Fixing Common Django Installation Issues
If you run into problems, here are some quick fixes:
- “‘python’ is not recognized” → Python isn’t in your PATH. Reinstall Python and check “Add Python to PATH.”
- “pip is not recognized” → Reinstall pip using:
python -m ensurepip --upgrade - Permission errors → Run Command Prompt as Administrator.
- Outdated pip → Upgrade it again using:
python -m pip install --upgrade pip
Once fixed, rerun the Django installation command.
Wrapping Up
And that’s it — you’ve successfully installed Django on Windows 11 and set up your first project!
From here, you can start building dynamic web applications, exploring Django’s admin interface, and learning about its powerful ORM (Object-Relational Mapping) system.
Django’s simplicity, combined with Python’s flexibility, makes it one of the best frameworks for both beginners and pros. So go ahead, open your favorite code editor, and start your next big web project today.