-1

I’m tearing my hair out! (Not much left!) When I run easy_install -U scikit-learn as admin I get the following error:

Admin$ easy_install -U scikit-learn

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-42472.pth' 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.

here is my system info:

Running Yosemite 10.10.5 Python 2.7 “which python” yields /usr/bin/python “which easy_install” yields /usr/bin/easy_install

I’ve tried everything and haven’t seen any good answers to this on various forums. If anyone can help, I’d really appreciate it!!!

2

You can check and see who owns the site-packages directory by using

ls -l /Library/Python/2.7/

You'll get results similar to this:

total 0
drwxr-xr-x  3 root  wheel  102 Jan 13 17:58 site-packages

The third column (that shows root above), shows the directory owner. In the above example, this directory is owned by root. I've seen similar errors related to this. I know that you stated you are running these commands as Admin, but prepending these install commands with sudo has worked for me, however, it will install the package globally:

sudo easy_install -U scikit-learn
  • Wow! That was too simple! Using sudo command above as you suggested fixed the install problem. I did get about 36 warnings, but so far its working. Thanks Chaz! – Paul Z Feb 3 '16 at 0:24

You must log in to answer this question.

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