easy_install --upgrade pytz 的问题
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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在文本编辑器中打开 /usr/local/bin/easy_install 并检查第一行;你可能会看到类似这样的内容:
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: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
).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 ofeasy_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.