尝试在 OSX 上安装 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 的权限”,但这没有用。
I'm trying to install easy_install and, well... see for yourself:
sh setuptools-0.6c11-py2.6.egg
Processing setuptools-0.6c11-py2.6.egg
Copying setuptools-0.6c11-py2.6.egg to /Library/Python/2.6/site-packages
Adding setuptools 0.6c11 to easy-install.pth file
Installing easy_install script to /usr/local/bin
error: /usr/local/bin/easy_install: Permission denied
How do I give my computer permission to do this? I tried telling it in a friendly voice, "computer, I hereby grant you permission to install easy_install" but that didn't work.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
使用 sudo。
我还会调查 MacPorts。
编辑(5年后):我现在建议使用 Homebrew 而不是 MacPorts。
Use sudo.
I would also investigate MacPorts.
Edit (5 years later): I now suggest Homebrew instead of MacPorts.
你应该使用 sudo 。您需要输入密码。
You should use sudo . You will need to enter your password.
从显示的路径来看,您很可能在 OS X 10.6 中使用 Apple 提供的 Python 2.6。如果是这样,请注意 Apple 已经在
/usr/bin
中轻松地为您安装了easy_install
。只需尝试输入easy_install
;如果软件包尝试安装脚本,您可能需要使用 sudo easy_install 。如果您使用的是其他 Python(您自己安装的),则需要为其安装单独版本的setuptools
(或较新的Distribute
)。Judging from the paths displayed, you are likely using the Apple-supplied Python 2.6 in OS X 10.6. If so, be aware that Apple has already easily installed
easy_install
for you in/usr/bin
. Just try typingeasy_install
; you may need to usesudo easy_install
if the package tries to install a script. If you are using another Python (one you installed yourself), you will need to install a separate version ofsetuptools
(or the newerDistribute
) for it.