7
1
I'm on OS X Lion and wanting to setup python virtual environments. I want to use virtualenvwrapper.
Can someone confirm that the correct way to do this is to install packages via easy_install (and subsequently pip) is using sudo
Context: to install virtaulenv i wanted to use pip, so i did
$ easy_install pip
error: can't create or remove files in install directory
The following error occurred while trying to add or remove files in the
installation directory:
[Errno 13] Permission denied: '/Library/Python/2.7/site-packages/test-easy-install-876.write-test'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/Library/Python/2.7/site-packages/
Perhaps your account does not have write access to this directory? If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account. If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.
For information on other options, you may wish to consult the
documentation at:
http://peak.telecommunity.com/EasyInstall.html
Please make the appropriate changes for your system and try again.
it seems the only way i can get easy_install to work is to do it using sudo. I've read elsewhere that this is a bad idea (although I'm not entirely sure why).
To clarify,
$ which python
/usr/bin/python
and it is 2.7.1.
1chmod +a 'user:YOUR_NAME_HERE allow add_subdirectory,add_file,delete_child,directory_inherit' /Library/Python/2.7/site-packages – tzs – 2012-08-09T19:41:54.127