3

尝试安装软件包时 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

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

4

3 回答 3

3

尝试手动更新您的设置工具。

wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
sudo python ez_setup.py --user
于 2013-10-23T20:51:00.883 回答
2

回答有关 pip 与 easy_install 的不同问题后,您可以使用 pip 卸载通过 easy_install 安装的软件包:

sudo pip uninstall distribute

这删除了有问题的分发版本,easy_install 再次工作。

于 2014-03-05T14:37:38.433 回答
0

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

于 2013-12-17T20:31:40.240 回答