我正在尝试使用pip安装一个名为gmplot的库。这在我的Mac上运行得很好,但在我的Windows10机器上就不行了。我得到以下错误:
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)
发布于 2018-08-17 06:06:35
对我来说,答案是在根目录的.bash_profile中设置代理。如果该文件不存在,请创建它。
例如:
导出http_proxy=
这是在虚拟机上连接到互联网的Centos系统上完成的。
https://stackoverflow.com/questions/43818274
复制相似问题