Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .