I'm in my project directory (a Django project) on the target device (Raspberry Pi) and want to install Django 1.8 in a virtual environment. I run the following commands:
sudo pip-3.2 install virtualenv
virtualenv-3.2 venv
source venv/bin/activate
pip-3.2 install Django==1.8
But pip tries to install Django at /usr/local/lib
and errors at:
creating /usr/local/lib/python3.2/dist-packages/django
error: could not create '/usr/local/lib/python3.2/dist-packages/django': Permission denied
I thought that activating the virtual environment makes pip install things in the project venv
dir. Am I missing something?
Use
pip
instead ofpip-3.2
It seems
pip-3.2
is pointing to system pip. You can check bywhich pip-3.2