python - 无法安装 urllib3,在使用 pip 之间有代理?
问题描述
基本上我正在尝试安装 urllib3 但我正在反击以下错误:
`C:\Python 3.7\Scripts>pip3.7.exe install urllib3
Collecting urllib3
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None))
after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection
.VerifiedHTTPSConnection object at 0x03285170>, 'Connection to pypi.org timed ou
t. (connect timeout=15)')': /simple/urllib3/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None))
after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection
.VerifiedHTTPSConnection object at 0x00D3E2B0>, 'Connection to pypi.org timed ou
t. (connect timeout=15)')': /simple/urllib3/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None))
after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection
.VerifiedHTTPSConnection object at 0x032AB610>, 'Connection to pypi.org timed ou
t. (connect timeout=15)')': /simple/urllib3/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None))
after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection
.VerifiedHTTPSConnection object at 0x032AB670>, 'Connection to pypi.org timed ou
t. (connect timeout=15)')': /simple/urllib3/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None))
after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection
.VerifiedHTTPSConnection object at 0x032AB5F0>, 'Connection to pypi.org timed ou
t. (connect timeout=15)')': /simple/urllib3/
pip3.7.exe install urllib3
Could not find a version that satisfies the requirement urllib3 (from versions: )
No matching distribution found for urllib3
我试过了: pip3.7.exe install urllib3
两者pip install urllib3
都有同样的问题
仅供参考:我位于代理后面。
非常感谢所有回复
解决方案
你说你在你的机器上使用代理服务器。这可能是问题所在,这就是您的错误消息说它超时的原因。pip
需要告知代理:
$ pip3.7.exe install urllib3 --proxy=http://name.of.proxy.com
此时它将使用代理并完成其请求。不能保证它会找到什么,但错误消息应该更有帮助。
推荐阅读
- javascript - 如何使相同的 js 库在浏览器中工作并做出原生反应?
- android - admob 未定义 - Cordova CLI
- php - 成功插入数据后如何使用 API 向号码发送短信并将其重定向到我的网站页面
- python - 如何使用 scipy。整合。四正确?
- multithreading - 单个进程/线程会导致死锁吗?
- fiware - Fiware 查询中忽略大小写
- reactjs - 从回调函数访问使用 useState 定义的状态变量
- context-free-grammar - 来自语言问题的上下文无关语法
- jquery - jquery 函数停止在 github 页面上工作
- python - 运行从 GitHub 下载的大脑提取的 Python 项目