尝试通过下载get-pip.py并运行python get-pip.py来在Windows 7中的python 2.7.6中安装pip。但是获取超时错误
Collecting pip
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connec
tion broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.conne
ction.VerifiedHTTPSConnection object at 0x034F5DB0>, 'Connection to pypi.python.
org timed out. (connect timeout=15)')': /simple/pip/
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connec
tion broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.conne
ction.VerifiedHTTPSConnection object at 0x034F5E50>, 'Connection to pypi.python.
org timed out. (connect timeout=15)')': /simple/pip/
Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connec
tion broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.conne
ction.VerifiedHTTPSConnection object at 0x034F5F30>, 'Connection to pypi.python.
org timed out. (connect timeout=15)')': /simple/pip/
Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connec
tion broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.conne
ction.VerifiedHTTPSConnection object at 0x034F5FD0>, 'Connection to pypi.python.
org timed out. (connect timeout=15)')': /simple/pip/
Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connec
tion broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.conne
ction.VerifiedHTTPSConnection object at 0x034F5970>, 'Connection to pypi.python.
org timed out. (connect timeout=15)')': /simple/pip/
答案 0 :(得分:-1)
问题是,它检查网络是否有更新版本。您可以使用--disable-pip-version-check
禁用它,然后它不应该使用重试机制。
使用:
PIP_DISABLE_PIP_VERSION_CHECK=1
它应该有用。
答案 1 :(得分:-1)
请按照以下步骤操作:
pip install pyp
并按Tab键将显示路径。