0

I'm currently using pip + virtualenv to isolate the Python dependencies in my Django application. It's worked alright so far, and I've been able to install a bunch of packages in the past. But when a coworker added the oauth2 dependency for django-social-auth I tried installing it from the updated env_reqs file using pip install -r env_reqs and received the following error:

error: could not delete '/Users/jeremypress/.virtualenvs/myproject/lib/python2.7/site-packages/tests/__init__.py': Permission denied

Thinking it was, perhaps, an issue with the env_reqs file, I also tried pip install oauth2 only to receive the same error. chowning and chmoding the file didn't help either...

I hesitate to just run sudo pip install oauth2 because I think the sudo bypasses the virtualenv and installs the package globally.

To clarify, I'm running OSX. Any ideas or explanations?

2

Have you activated your virtual environment?

Run:

. bin/activate

in your shell. Then the local pip installation will take over the system one.

If that also does not work try running:

~/.virtualenvs/myapp/bin/pip install -r oauth2

Instead of just:

pip install -r oauth2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.