Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

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
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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