2017-07-06 80 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 

的文档在这里混乱,因为它并没有提到要求通过协议的一部分代理定义。