3
votes

I'm trying to setup easy_install on my mac. But I'm getting the following error.

Installing Setuptools running install Checking .pth file support in /Library/Python/2.7/site-packages/ 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-789.pth'

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

/Library/Python/2.7/site-packages/

5
What sequence of commands do you run? (i.e. which way are you installing easy_install?)damienfrancois
sudo curl bootstrap.pypa.io/ez_setup.py -o - | pythonBerendschot

5 Answers

8
votes

Try again using sudo python ... to be able to write to '/Library/Python/2.7/site-packages/

0
votes

Try pyenv, its somewhat similar to rbenv and is easier to remove if you don't need it. Also, you can play with different versions of pythons without tinkering the system dependencies.

0
votes

Try curl bootstrap.pypa.io/ez_setup.py -o - | sudo python for access related issues.

0
votes

You can add "sudo" before "python setup.py ..." in the install.sh.

0
votes

You can also use the --user flag (instead of sudo or pyenv):

$ easy_install --user -U ...

See here.