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
发生了什么?我该如何解决
解决方法:
尝试手动更新设置工具.
wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
sudo python ez_setup.py --user
标签:easy-install,python 来源: https://codeday.me/bug/20190831/1776166.html