2017-07-28 277 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 –