pip安装连接错误

时间:2017-05-06 08:19:30

标签: python pip

我正在尝试使用pip安装一个名为gmplot的库。这在我的Mac上工作得很好,但不是我的Windows 10机器。我收到以下错误:

C:\Users\Alex>pip install gmplot
Collecting gmplot
  Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x0000000003BD70B8>: Failed to establish a new connection: [Errno 11003] getaddrinfo failed',)': /simple/gmplot/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x0000000003BD7A58>: Failed to establish a new connection: [Errno 11003] getaddrinfo failed',)': /simple/gmplot/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x0000000003BD7DA0>: Failed to establish a new connection: [Errno 11003] getaddrinfo failed',)': /simple/gmplot/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x0000000003BD75C0>: Failed to establish a new connection: [Errno 11003] getaddrinfo failed',)': /simple/gmplot/
  Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x0000000003BD7D30>: Failed to establish a new connection: [Errno 11003] getaddrinfo failed',)': /simple/gmplot/
  Could not find a version that satisfies the requirement gmplot (from versions: )
No matching distribution found for gmplot

其他stackoverflow线程提到在pip命令中添加代理详细信息,但我不使用代理。我也将我的DNS更改为Google的DNS,但这不起作用。

(Python 2.7)

1 个答案:

答案 0 :(得分:0)

对我来说,答案是在根目录的.bash_profile中设置代理。如果没有该文件,请创建它。

EX:

导出http_proxy =

这是在Centos系统上通过虚拟机连接到Internet来完成的。