2014-11-03 48 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」。

相關問題