I am running this inside a virtual environment.
When I type:
pip install django
I get:
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: /home/ENV/env/lib/python3.5/site-packages/pytz Consider using the --user option or check the permissions.
For it to work, I actually need to input:
python -m pip install --user django
Why?
python -m
is here to specify the interpreter, you must not neglect that, if you have multiple versions of python installed, keeping track of which python version version pip is bound to is a PITA imo, hencepython -m
in this case you're sure that it's the pip bound to the python called which will be executed.