点子坏了.如何修复DistributionNotFound错误? [英] pip broke. how to fix DistributionNotFound error?
问题描述
每当我尝试使用点子时,都会出现错误.例如:
Whenever i try to use pip I get an error. For exampple:
$ sudo pip install gevent-websocket
Traceback (most recent call last):
File "/usr/local/bin/pip", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2675, in <module>
parse_requirements(__requires__), Environment()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 552, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: pip==0.8.1
我很想将pip的值更改为pip == 0.8.2 ..但我不愿意处理黑客入侵"我的安装的后果... 我正在运行python 2.7,pip的版本为0.8.2.
I feel tempted to change the value of into pip==0.8.2.. but I dont feel dealing with the consequences of 'hacking' up my installation... I'm running python 2.7 and pip is at version 0.8.2.
推荐答案
我在MacBook中发现了这个问题,原因是因为正如@Stephan所说,我使用easy_install
来安装pip,以及这两种py软件包的混合物管理工具导致pkg_resources.DistributionNotFound
问题.
解决方法是:
I find this problem in my MacBook, the reason is because as @Stephan said, I use easy_install
to install pip, and the mixture of both py package manage tools led to the pkg_resources.DistributionNotFound
problem.
The resolve is:
easy_install --upgrade pip
请记住:只需使用上述工具中的一个来管理您的Py软件包.
Remember: just use one of the above tools to manage your Py packages.
这篇关于点子坏了.如何修复DistributionNotFound错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!