The virtualenv
package that can be installed from PyPI via pip
is geared more for Python 2. If you're using Python 3, you won't need to use this package anymore since the same capabilities are part of Python itself.
To create a new virtual environment do the following:
python3 -m venv venv
source venv/bin/activate
At this point, you have a virtual environment ready to use. I would recommend installing wheel
at this point.
pip install wheel
Also, some of the packages in a new virtual environment may not be current. If you want to know which packages may be out of date do the following:
pip list -o
And if you see packages that are out of date, you can run the following command to update everything in one go. This command requires that you have jq
installed (this may not work properly on Windows).
pip list -o --format json | jq -r '.[].name' | xargs -n 1 pip install -U
If that command doesn't work properly because you're on Windows, each of the out of date packages can be updated like so:
pip install -U <packagename>
You will then be able to install Django according to the documentation.
python -m pip install Django
or you can install the requirements from a file as you have in you list of steps.
pip install -r requirements.txt