I have a virtualenv with Python 2.7 and I'm trying to install some packages that have C extensions (in this case, pygame and/or pyaudio):
$ which pip
/Users/fyhuang/env/bin/pip
$ pip -V
pip 1.4 from /Users/fyhuang/env/lib/python2.7/site-packages (python 2.7)
When I try to install these packages, however, pip decides that it wants to install the compiled C extensions into the system directories, instead of the virtualenv:
running install_lib
creating /lib
error: could not create '/lib': Permission denied
Is this expected behavior from pip? If not, has anyone else run into this issue before? This is on OSX 10.8.