11

当我使用命令时:

easy_install spotter

要安装spotter软件包,我收到以下错误消息

Searching for spotter
Reading http://pypi.python.org/simple/spotter/
Download error on http://pypi.python.org/simple/spotter/: [Errno 11001] getaddrinfo      failed -- Some packages may not be found!
Reading http://pypi.python.org/simple/spotter/
Download error on http://pypi.python.org/simple/spotter/: [Errno 11001] getaddrinfo failed -- Some packages may not be found!
Couldn't find index page for 'spotter' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
Download error on http://pypi.python.org/simple/: [Errno 11001] getaddrinfo failed -- Some packages may not be found!
No local packages or download links found for spotter
error: Could not find suitable distribution for Requirement.parse('spotter')

http_proxy两个环境变量:https_proxy好像不行?

使用 ez_setup.py 从代理服务器后面安装 Python 的 easy_install

4

3 回答 3

15

您是否尝试过以下操作:

$ export http_proxy=http://username:password@some.proxy.com:portnumber
$ export https_proxy=https://username:password@some.proxy.com:portnumber

接着

$ sudo -E easy_install spotter

我遇到了一个与您类似的问题(我在一个非常严格的防火墙+代理组合之后)并且上面的一组命令和组合对我有用(在 GNU/Linux 环境中,特别是 Ubuntu)。

于 2014-04-25T08:18:21.190 回答
4

在 Windows 命令提示符下,首先设置两个环境变量:

c:\> set http_proxy=<user>:<password>@<proxy_ip_address>:<port>
c:\> set https_proxy=<user>:<password>@<proxy_ip_address>:<port>

然后,我能够运行(在同一个终端):

easy_install spotter
于 2016-09-22T11:09:10.210 回答
4

您必须将代理配置放入 Internet Explorer 并重新启动终端。

Internet Explorer 中的代理配置

于 2016-01-12T16:31:44.490 回答