"pkg_resources.DistributionNotFound";一键安装 [英] "pkg_resources.DistributionNotFound" at pip and easy install
问题描述
我必须通过pip将软件包(详细信息:lxml软件包)安装到服务器上的Python2.7中(在ScientificLinux上运行). 正在运行Python 2.6和2.7.
I have to install a package via pip (in detail: the package lxml) into Python2.7 on our server (running on ScientificLinux). There is running Python 2.6 and 2.7.
命令pip
指向该软件包已经存在的Python2.6安装.当我尝试运行pip-2.7时,他抛出以下错误:
The command pip
points to our Python2.6 installation where the package already exists. When I try to run pip-2.7, he is throwing the following errors:
Traceback (most recent call last):
File "/usr/local/bin/pip-2.7", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 2659, in <module>
parse_requirements(__requires__), Environment()
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 546, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: pip==1.4.1
这是一个众所周知的问题(链接),但是接受的答案不起作用.当我想通过easy_install升级pip时,出现类似上面的错误:
Thats a well known problem here (Link), but the accepted answer doesn't work. When I want to upgrade pip via easy_install, I get a similar error like the one above:
Traceback (most recent call last):
File "/usr/local/bin/easy_install", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 2659, in <module>
parse_requirements(__requires__), Environment()
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 546, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: distribute==0.6.49
我已经在此处找到了可能的解决方案,但是它也无济于事,版本设置正确:/
I found already a possible solution here, but it also doesn't help, the versions are set right :/
推荐答案
您是否尝试过在克里斯托弗·戈尔克(Christopher Gohlke)的网站?对于Windows用户来说,这是一个巨大的资源(我本人对他们非常有帮助.)他有许多lxml安装程序.
Have you tried using one of the installers on Christopher Gohlke's site? This is a tremendous resource for Windows users (I myself have found them extremely helpful.) He has a number of lxml installers.
这篇关于"pkg_resources.DistributionNotFound";一键安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!