python - easy_install在分发升级后停止工作

时间:2013-09-24 12:10:39

标签: python easy-install

当尝试安装软件包时,easy_install要求我升级分发:

The required version of distribute (>=0.6.35) is not available,
and can't be installed while this script is running. Please
install a more recent version first, using
'easy_install -U distribute'.

这似乎工作正常:

$ easy_install -U distribute
Searching for distribute
Reading http://pypi.python.org/simple/distribute/
Best match: distribute 0.7.3
Processing distribute-0.7.3-py2.7.egg
Removing distribute 0.6.28 from easy-install.pth file
Adding distribute 0.7.3 to easy-install.pth file

Using /xxx/software/lib/python2.7/site-packages/distribute-0.7.3-py2.7.egg
Processing dependencies for distribute
Finished processing dependencies for distribute

但是现在当我开始easy_install时,我得到了这个:

$ easy_install
Traceback (most recent call last):
  File "/xx/software/bin/easy_install", line 9, in <module>
    load_entry_point('distribute', 'console_scripts', 'easy_install')()
  File "/xx/software/lib/python2.7/site-packages/setuptools-1.1.6-py2.7.egg/pkg_resources.py", line 357, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/xx/software/lib/python2.7/site-packages/setuptools-1.1.6-py2.7.egg/pkg_resources.py", line 2393, in load_entry_point
    raise ImportError("Entry point %r not found" % ((group,name),))
ImportError: Entry point ('console_scripts', 'easy_install') not found

发生什么事了?我该如何解决这个

3 个答案:

答案 0 :(得分:3)

尝试手动更新设置工具。

wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
sudo python ez_setup.py --user

答案 1 :(得分:2)

关于pip与easy_install的其他问题answer之后,您可以使用pip卸载使用easy_install安装的软件包:

sudo pip uninstall distribute

这删除了违规的分发版本,easy_install再次运行。

答案 2 :(得分:0)

我有同样的问题,然后我发现有easy_install-2.7,我可以正确安装包。