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

发布于 2024-10-07 18:31:26 字数 455 浏览 0 评论 0原文

我正在尝试安装 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

凉薄对峙 2024-10-14 18:31:26

使用 sudo

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

我还会调查 MacPorts

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

Use sudo.

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

I would also investigate MacPorts.

Edit (5 years later): I now suggest Homebrew instead of MacPorts.

诠释孤独 2024-10-14 18:31:26
sudo sh setuptools-0.6c11-py2.6.egg
sudo sh setuptools-0.6c11-py2.6.egg
流年里的时光 2024-10-14 18:31:26

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

You should use sudo . You will need to enter your password.

腻橙味 2024-10-14 18:31:26

从显示的路径来看,您很可能在 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 typing easy_install; you may need to use sudo 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 of setuptools (or the newer Distribute) for it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文