2017-07-06 115 views
1

我試圖更新點子,但我不斷收到以下消息:蟒蛇-m PIP安裝-U PIP errno的11004

H:\>python -m pip install -U pip 
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.con 
nection.VerifiedHTTPSConnection object at 0x031AF3B0>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed',)': /simple/pip/ 
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.con 
nection.VerifiedHTTPSConnection object at 0x031AF3D0>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed',)': /simple/pip/ 
Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.con 
nection.VerifiedHTTPSConnection object at 0x031AF110>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed',)': /simple/pip/ 
Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.con 
nection.VerifiedHTTPSConnection object at 0x031AF0B0>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed',)': /simple/pip/ 
Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.con 
nection.VerifiedHTTPSConnection object at 0x031AF170>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed',)': /simple/pip/ 
Requirement already up-to-date: pip in c:\users\a256886\appdata\local\programs\python\python36-32\lib\site-packages 

我有蟒蛇3.6.1安裝,當我運行PIP --version我見點9.0.1。

爲什麼我無法更新它?或者用pip安裝任何軟件包?發生什麼事?我該如何解決它?

+0

9.0.1是pip的最新版本。你爲什麼試圖更新它? – jwodder

+0

@jwodder我想安裝django。我設法創建了一個虛擬環境,但是當我嘗試安裝django'pip install django〜= 1.10.0' 我得到相同類型的錯誤但是: '找不到滿足要求的版本django〜 = 1.10.0(來自版本:) 沒有找到匹配分佈的django〜= 1.10.0' –

+0

@ G.Doe:你是否在代理之後? –

回答

1

你在代理人後面。當你發現,你可以使用--proxy參數傳遞的代理pip

python -m pip install -U pip --proxy http://username:[email protected]_url:port 

pip install --upgrade pip --proxy http://username:[email protected]_url:port 

的文檔在這裏混亂,因爲它並沒有提到要求通過協議的一部分代理定義。