bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths
Learn/Django/Django Tutorial
Django•Django Tutorial

Install Django

Now, that we have created a virtual environment, we are ready to install Django.

Note

Remember to install Django while you are in the virtual environment!

Django is installed using pip, with this command:

(myworld) ... $
 python -m pip install Django

Which will give a result that looks like this (at least on my Windows machine):

Collecting Django
 Downloading Django-5.1.7-py3-none-any.whl.metadata (4.1 kB)
Collecting asgiref<4,>=3.8.1 (from Django)
 Downloading asgiref-3.8.1-py3-none-any.whl.metadata (9.3 kB)
Collecting sqlparse>=0.3.1 (from Django)
 Downloading sqlparse-0.5.3-py3-none-any.whl.metadata (3.9 kB)
Collecting tzdata (from Django)
 Downloading tzdata-2025.1-py2.py3-none-any.whl.metadata (1.4 kB)
Downloading Django-5.1.7-py3-none-any.whl (8.3 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
8.3/8.3 MB
36.4 MB/s
 eta
0:00:00
Downloading asgiref-3.8.1-py3-none-any.whl (23 kB)
Downloading sqlparse-0.5.3-py3-none-any.whl (44 kB)
Downloading tzdata-2025.1-py2.py3-none-any.whl (346 kB)
Installing collected packages: tzdata, sqlparse, asgiref, Django
Successfully installed Django-5.1.7 asgiref-3.8.1 sqlparse-0.5.3 tzdata-2025.1
[
notice
] A new release of pip is available:
24.3.1
 ->
25.0.1
[
notice
] To update, run:
python.exe -m pip install --upgrade pip

That's it! Now you have installed Django in your new project, running in a virtual environment!

Windows, Mac, or Unix?

You can run this project on either one. There can be some small differences, like some Windows versions prefers py as the first word in the command line, instead of python :

python --version

In the rest of this tutorial, we will be using Windows commands with the python keyword.

Check Django Version

You can check if Django is installed by asking for its version number like this:

(myworld) C:\Users\
Your Name
>
django-admin --version

If Django is installed, you will get a result with the version number:

5.1.7

What's Next?

Now you are ready to create a Django project in a virtual environment on your computer.

In the next chapters of this tutorial we will create a Django project and look at the various features of Django and hopefully make you a Django developer.

Previous

Django - Create Virtual Environment

Next

Django Create Project

This chapter

Overview
15

Lessons

36m

Read time

1. Django Tutorial2. Django Introduction3. Django Getting Started4. Django - Create Virtual Environment5. Install Django6. Django Create Project7. Django Create App8. Django Views9. Django URLs10. Django Templates11. Django Models12. Django Insert Data13. Django Update Data14. Django Delete Data15. Django Update Model

On this page

Windows, Mac, or Unix?Check Django VersionWhat's Next?