easy_install --upgrade pytz 的问题

发布于 2024-11-11 07:46:02 字数 298 浏览 7 评论 0原文

easy_install 很好而且很有帮助。我一直在用它。然而今天我发现它不起作用。

错误消息:

#easy_install --upgrade pytz
-bash: /usr/local/bin/easy_install: /usr/bin/python2.6: bad interpreter: No such file or directory

我认为这是由我重新安装 python 引起的,而我使用的是 python2.7

那么,我该如何解决这个问题

谢谢

easy_install was good and very helpful. I have been using it. However, I found it unfunctioning today.

error msg:

#easy_install --upgrade pytz
-bash: /usr/local/bin/easy_install: /usr/bin/python2.6: bad interpreter: No such file or directory

I think it is caused by my reinstallation of python and the one I am using is python2.7

So, how can I fix this problem

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

彩扇题诗 2024-11-18 07:46:02

在文本编辑器中打开 /usr/local/bin/easy_install 并检查第一行;你可能会看到类似这样的内容:

 #!/usr/bin/python2.6

shebang 行 告诉内核应该执行哪个命令来评估脚本主体。错误消息表明缺少/usr/bin/python2.6

要解决此问题并获得有效的 easy_install 脚本,您至少需要使用 Python 2.7 解释器安装 distribute 并重新安装您所依赖的软件包(例如pytz)。

Open /usr/local/bin/easy_install in a text editor and examine the first line; you'll probably see something like this:

 #!/usr/bin/python2.6

This shebang line tells the kernel which command it should execute to evaluate the script body. The error message indicates that /usr/bin/python2.6 is missing.

To fix this and get a working easy_install script, at a minimum you'll need to install distribute using your Python 2.7 interpreter and reinstall the packages you depend on (e.g. pytz).

彩扇题诗 2024-11-18 07:46:02

easy_install 与特定的 Python 实例关联。每个 Python 实例都需要有自己的副本。因此,您需要为 python2.7 安装新版本的 easy_install。它由传统的 setuptools 项目或更积极维护的 分发项目。请按照任一安装说明进行操作。

easy_install is associated with a particular Python instance. Each Python instance needs to have its own copy. Thus you need to install a new version of easy_install for python2.7. It is supplied by either the traditional setuptools project or the more actively maintained Distribute project. Follow the installation instructions for either one.

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