2017-07-28 217 views
0

尝试安装请求,获取以下错误消息。我也试着手动下载它们并运行基于本地文件的相同代码,但我遇到了同样的问题。我不认为它是在请求端,因为如果我尝试通过点下载任何东西,我会得到相同的错误信息。pip安装请求错误

C:\Users\212615669>pip install requests 
Collecting requests 
    Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connec 
tion broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.conne 
ction.VerifiedHTTPSConnection object at 0x031251D0>: Failed to establish a new c 
onnection: [Errno 11004] getaddrinfo failed',)': /simple/requests/ 
    Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connec 
tion broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.conne 
ction.VerifiedHTTPSConnection object at 0x03125190>: Failed to establish a new c 
onnection: [Errno 11004] getaddrinfo failed',)': /simple/requests/ 
    Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connec 
tion broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.conne 
ction.VerifiedHTTPSConnection object at 0x03125090>: Failed to establish a new c 
onnection: [Errno 11004] getaddrinfo failed',)': /simple/requests/ 
    Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connec 
tion broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.conne 
ction.VerifiedHTTPSConnection object at 0x03121FD0>: Failed to establish a new c 
onnection: [Errno 11004] getaddrinfo failed',)': /simple/requests/ 
    Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connec 
tion broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.conne 
ction.VerifiedHTTPSConnection object at 0x03121EB0>: Failed to establish a new c 
onnection: [Errno 11004] getaddrinfo failed',)': /simple/requests/ 
    Could not find a version that satisfies the requirement requests (from version 
s:) 
No matching distribution found for requests 
+0

此错误是关于互联网连接不请求库安装 –

+0

他们使用的是代理 –

回答

0

简单的方法是给代理信息。

pip install --proxy=user:[email protected]:port requests 

第二个方法是使用出口代理设置

set http_proxy=http://username:[email protected]:port 
set https_proxy=https://username:[email protected]:port 
pip install requests 
+0

等待我该怎么办获取我的代理信息?那就是我放置localhost之类的地方吗? – Nick

+0

检查了这个https://stackoverflow.com/questions/22368515/how-to-see-the-proxy-settings-on-windows – skr

+0

我很难找到我的代理信息(类似于其他用户该线程我不直接控制我的网络)。你知道有什么其他的方式来下载它吗?我已经下载了我认为包含所有内容的文件的压缩文件 – Nick

0
sudo -H pip install requests --proxy="my_proxy_name:port" 

试试这个

+0

可能是一个愚蠢的问题,但究竟是什么代理呢?有没有办法像本地主机一样做? – Nick

+0

https://stackoverflow.com/questions/22368515/how-to-see-the-proxy-settings-on-windows?noredirect=1&lq=1 –