Install Django using the Python PIP

Finally, we are going to install Django on our machine; with our virtual space active, we execute:

$ pip install Django

And this is it, we already have Django installed in our virtual space; but, we just install a package, and we don't have a project; but, with this package we can create projects in Django:

If we do a:

$ pip freeze

You'll see all the packages that make up the Django package we installed earlier; something like:

asgiref==3.7.2
Django==5.0
sqlparse==0.4.4
tzdata==2023.3

As we mentioned before, it is very common that when installing packages via the pip, these packages also need other packages to be able to work, and with this, the same ones are also installed, and these are known as dependencies.

In the example above, the asgiref, sqlparse, tzdata packages are dependencies of the Django package.

It is important to note that you will probably have some slightly newer versions and not exactly the same ones listed here (the version of each package is found after the ==).

As you can see, the previous command indicates all the packages installed at the virtual space level (if it is active) or at the operating system level (if the virtual space is deactivated or you are simply not using it).

- Andrés Cruz

En español
Andrés Cruz

Develop with Laravel, Django, Flask, CodeIgniter, HTML5, CSS3, MySQL, JavaScript, Vue, Android, iOS, Flutter

Andrés Cruz In Udemy

I agree to receive announcements of interest about this Blog.