Installing Django
We will be using pip to install Django. pip is the standard package manager for Python to install and manage packages not part of the standard Python library. pip is automatically installed if you downloaded Python from https://www.python.org/.
First, check whether you have pip installed by going to the Terminal and running the following.
For macOS, run this:
pip3
For Windows, run this:
pip
If you have pip installed, the output should display a list of pip commands. To install Django, run the following command:
For macOS, run this:
pip3 install Django==4.0
For Windows, run this:
pip install Django==4.0
The preceding command will retrieve the latest Django code and install it on your machine. After installation, close and reopen your Terminal.
Ensure you have installed Django by running the following commands.
For macOS, run this:
python3 -m django
For Windows, run this:
python -m django
Now, the output will show...