Django Tutorial · Django Tutorial

Install Django

Learn all about Install Django in this comprehensive tutorial.

5 min read intermediate
  • Now, that we have created a virtual environment, we are ready to install Django.
  • You can run this project on either one.
  • You can check if Django is installed by asking for its version number like this:
  • Now you are ready to create a Django project in a virtual environment on your computer.

Install Django

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

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

Django is installed using pip, with this command:

python

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

python

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
Note: 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:

python

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

python

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.

Module quiz

2 questions
1

Which of the following is true about Install Django?

2

What is the most common pitfall when working with Install Django?

Answer all questions to submit.