get-pip无法安装

softadmin 2017-4-6 4113

将get-pip.py上传到服务器,执行时报超时。
python get-pip.py
Collecting pip
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x2c1aad0>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/pip/
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x2c1aa90>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/pip/
Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x2c1a510>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/pip/
Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x2c1a3d0>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/pip/
Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x2c1a990>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/pip/
Could not find a version that satisfies the requirement pip (from versions: )
No matching distribution found for pip


直接wget https://bootstrap.pypa.io/get-pip.py
--2017-04-06 14:39:58-- https://bootstrap.pypa.io/get-pip.py
Resolving bootstrap.pypa.io (bootstrap.pypa.io)... 151.101.72.175

Connecting to bootstrap.pypa.io (bootstrap.pypa.io)|151.101.72.175|:443...


解决方法:
网络不行。使用代理的方式安装pip即可。
python get-pip.py --proxy="******"



最新回复 (0)
返回