Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

can't create or remove files in install directory: Difficulty installing pip

Tags:

python

pip

I am running Enthought python on a Mac in 32 bit mode

my PATH varaible is set at PATH=/Library/Frameworks/Python.framework/Versions/Current/bin:/Library/Frameworks/Python.framework/Versions/Current/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin

when I attempt an install or easy_install I get "cant creat or remove files in the install directory"

here is the trace (ls -l of the directory follows as well)

Johns-MacBook-Pro:bin jc_macpro$ 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/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/test-easy-install-516.write-test'

The installation directory you specified (via --install-dir, --prefix, or the distutils default setting) was:

/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.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://packages.python.org/distribute/easy_install.html

Please make the appropriate changes for your system and try again.

=========================== when i look at site-packages, it has the following access privileges. I am the administrator account.

drwxrwxr-x 107 root wheel 3638 Oct 21 09:55 site-packages

like image 616
Returning to Coding Avatar asked Dec 20 '12 13:12

Returning to Coding


2 Answers

You’ll need to run sudo easy_install otherwise you won’t have permission to write to the install dirs.

like image 195
paulgrav Avatar answered Nov 15 '22 21:11

paulgrav


Have you tried sudo for the installation? It should give you the rights to 'create or remove' files.

like image 21
Eddy Yuansheng Wu Avatar answered Nov 15 '22 20:11

Eddy Yuansheng Wu