我正在尝试使用easy_install在我的Ubuntu 14.04计算机上安装。我键入以下命令以root用户身份安装:
sudo easy_install mercurial
在终端上,我收到此错误消息:
Searching for mercurial
Reading https://pypi.python.org/simple/mercurial/
Download error on https://pypi.python.org/simple/mercurial/: [Errno -2] Name or service not known -- Some packages may not be found!
Couldn't find index page for 'mercurial' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Download error on https://pypi.python.org/simple/: [Errno -2] Name or service not known -- Some packages may not be found!
No local packages or download links found for mercurial
error: Could not find suitable distribution for Requirement.parse('mercurial')
有人可以帮我解决为什么它不起作用吗?
PS。我正在代理服务器后面运行此程序,并且已设置所有必需的env变量。当我运行env
命令时
HTTP_PROXY=http://username:[email protected]:3128
HTTPS_PROXY=https://username:[email protected]:3128
作为我的代理集。
sudo有问题。如果使用sudo,则变量$ http_proxy在这种情况下是未知的。
您可以使用sudo -i(它将为您打开root shell),然后再次设置proxy变量。之后,运行easy_install(因为您已经是超级用户,所以不需要sudo)
有关更多详细信息:https : //superuser.com/questions/258819/easy-install-will-not-connect-through-proxy?answertab=active#tab-top
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句