2014-11-03 81 views
3

我想在我的Mac上设置easy_install。 但我收到以下错误。setuptools easy_install mac 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/

+0

你运行什么命令序列? (即你安装easy_install的方式是什么?) – damienfrancois 2014-11-03 10:38:10

+0

sudo curl https://bootstrap.pypa.io/ez_setup.py -o - | python – Berendschot 2014-11-03 10:43:24

回答

7

尝试再次使用sudo python ...要能写“/Library/Python/2.7/site-packages/

+0

仍然收到相同的错误。 – Berendschot 2014-11-03 10:37:10

+3

你需要sudo'python'命令,而不是'curl'命令。请注意,您必须绝对相信bootstrap.pypa.io/ez_setup.py中的人员以这种方式运行此类命令。 – damienfrancois 2014-11-03 10:45:36

+0

除了该命令'easy_install'之外,这个工作仍然没有找到 – Berendschot 2014-11-03 10:47:39

0

尝试pyenv,它有点类似于rbenv,是比较容易,如果你不删除”不需要它。此外,你可以玩不同版本的蟒蛇,而不需要修改系统依赖关系。

0

尝试curl bootstrap.pypa.io/ez_setup.py -o - | sudo python访问相关的问题。

0

您可以在install.sh中的“python setup.py ...”之前添加“sudo”。

相关问题