Having trouble installing Django 1.8 in virtualenv

850 views Asked by At

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?

1

There are 1 answers

1
moonstruck On BEST ANSWER

Use pip instead of pip-3.2

source venv/bin/activate
pip install Django==1.8

It seems pip-3.2 is pointing to system pip. You can check by which pip-3.2