pip安装pkg_resources.DistributionNotFound: pip==9.0.1

来源:互联网 发布:c语言技巧 编辑:程序博客网 时间:2024/06/13 11:44

执行pip命令报错

Traceback (most recent call last):  File "./pip", line 5, in <module>    from pkg_resources import load_entry_point  File "/opt/soft/distribute-0.7.3/pkg_resources.py", line 2989, in <module>    working_set.require(__requires__)  File "/opt/soft/distribute-0.7.3/pkg_resources.py", line 726, in require    needed = self.resolve(parse_requirements(requirements))  File "/opt/soft/distribute-0.7.3/pkg_resources.py", line 624, in resolve    raise DistributionNotFound(req)pkg_resources.DistributionNotFound: pip==9.0.1

应该是缺少pip9.0.1
执行easy_install pip==9.0.1又报错

Traceback (most recent call last):  File "/usr/bin/easy_install", line 5, in <module>    from pkg_resources import load_entry_point  File "/opt/soft/distribute-0.7.3/pkg_resources.py", line 2993, in <module>    parse_requirements(__requires__), Environment()  File "/opt/soft/distribute-0.7.3/pkg_resources.py", line 624, in resolve    raise DistributionNotFound(req)pkg_resources.DistributionNotFound: distribute==0.6.10

再安装distribute包

wget http://pypi.python.org/packages/source/d/distribute/distribute-0.6.10.tar.gzcd distribute-0.6.10python setup.py install

再次安装pip9.0.1

easy_install pip==9.0.1

安装成功

Adding pip 9.0.1 to easy-install.pth fileInstalling pip script to /usr/local/python2.7/binInstalling pip2.7 script to /usr/local/python2.7/binInstalling pip2 script to /usr/local/python2.7/binInstalled /usr/local/python2.7/lib/python2.7/site-packages/pip-9.0.1-py2.7.eggProcessing dependencies for pip==9.0.1Finished processing dependencies for pip==9.0.1

运行pip
这里写图片描述

0 0
原创粉丝点击