尝试在OSX上安装easy_install时权限被拒绝

时间:2010-12-11 13:40:02

标签: python macos installation easy-install

我正在尝试安装easy_install,好吧......亲眼看看:


sh setuptools-0.6c11-py2.6.egg

处理setuptools-0.6c11-py2.6.egg

将setuptools-0.6c11-py2.6.egg复制到/Library/Python/2.6/site-packages

将setuptools 0.6c11添加到easy-install.pth文件

将easy_install脚本安装到/ usr / local / bin

错误:/ usr / local / bin / easy_install:权限被拒绝


如何授予我的计算机权限?我尝试用友好的声音告诉它,“计算机,我特此授予您安装easy_install的权限”,但这不起作用。

4 个答案:

答案 0 :(得分:13)

使用sudo

sudo sh setuptools-0.6c11-py2.6.egg

我还会调查MacPorts

编辑(5年后):我现在建议Homebrew而不是MacPorts。

答案 1 :(得分:5)

sudo sh setuptools-0.6c11-py2.6.egg

答案 2 :(得分:3)

你应该使用sudo。您需要输入密码。

答案 3 :(得分:3)

从显示的路径判断,您可能在OS X 10.6中使用Apple提供的Python 2.6。如果是这样,请注意Apple已经在easy_install为您轻松安装了/usr/bin。只需输入easy_install;如果程序包尝试安装脚本,则可能需要使用sudo easy_install。如果您使用的是其他Python(您自己安装的),则需要为其安装单独版本的setuptools(或更新的Distribute)。