Installing Django with pip

The pip package management system is the preferred method for installing Django. Python 3.6 comes with pip preinstalled, but you can find pip installation instructions at https://pip.pypa.io/en/stable/installing/.

Run the following command at the shell prompt to install Django with pip:

pip install Django==2.0.5

Django will be installed in the Python site-packages/ directory of your virtual environment.

Now, check whether Django has been successfully installed. Run python on a terminal, import Django, and check its version, as follows:

>>> import django>>> django.get_version()'2.0.5'

If you get the preceding output, Django has been successfully installed on your machine.

Django can be installed in several other ...

Get Django 2 by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.