[英]Problems with easy_install --upgrade pytz
easy_install was good and very helpful. easy_install 很好而且很有帮助。 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我认为这是由于我重新安装了 python 而我使用的是 python2.7
So, how can I fix this problem那么,我该如何解决这个问题
Thanks谢谢
Open /usr/local/bin/easy_install
in a text editor and examine the first line;在文本编辑器中打开
/usr/local/bin/easy_install
并检查第一行; 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.这个shebang 行告诉 kernel 它应该执行哪个命令来评估脚本主体。 The error message indicates that
/usr/bin/python2.6
is missing.错误消息表明缺少
/usr/bin/python2.6
。
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 (eg pytz
).要解决此问题并获得工作的 easy_install 脚本,您至少需要使用 Python 2.7 解释器安装分发并重新安装您依赖的软件包(例如
pytz
)。
easy_install
is associated with a particular Python instance. easy_install
与特定的 Python 实例相关联。 Each Python instance needs to have its own copy.每个 Python 实例都需要有自己的副本。 Thus you need to install a new version of
easy_install
for python2.7.因此,您需要为 python2.7 安装新版本的
easy_install
。 It is supplied by either the traditional setuptools project or the more actively maintained Distribute project.它由传统的setuptools项目或更积极维护的Distribute项目提供。 Follow the installation instructions for either one.
请按照任一安装说明进行操作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.