3

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/

Berendschot
  • 3,026
  • 1
  • 21
  • 43

5 Answers5

8

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

damienfrancois
  • 52,978
  • 9
  • 96
  • 110
0

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.

ranendra
  • 2,492
  • 2
  • 19
  • 29
0

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

miken32
  • 42,008
  • 16
  • 111
  • 154
0

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

MXP
  • 1
  • 1
0

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

$ easy_install --user -U ...

See here.

davetapley
  • 17,000
  • 12
  • 60
  • 86