Pip 安装软件包错误:由于 OSError 无法安装软件包
每当我尝试执行 pip install [any package name]
时,都会收到以下错误:
错误:由于操作系统错误而无法安装软件包: HTTPSConnectionPool(主机='files.pythonhosted.org',端口=443):最大 url 重试次数超出: /packages/31/58/d97b7af5302e63bfb3881931fda4aaacbbdcbc31257f983c06703d304c1e/streamlit_chat-0.0.2.1-py3-none-any.whl (由于 ConnectTimeoutError(
, '连接到 files.pythonhosted.org 超时。 (连接超时=15)'))
我已经尝试了在堆栈上找到的以下解决方案,但它不起作用,并且出现相同的错误:
pip install --trusted-host=pypi .python.org --trusted-host=pypi.org --trusted-host=files.pythonhosted.org --upgrade --proxy=http://127.0.0.1:3128 [包名称]
pip install --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org [软件包名称]
我使用的是windows系统,sublime作为我的常规编码环境。
I am getting the following error whenever I try to execute pip install [any package name]
:
ERROR: Could not install packages due to an OSError:
HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Max
retries exceeded with url:
/packages/31/58/d97b7af5302e63bfb3881931fda4aaacbbdcbc31257f983c06703d304c1e/streamlit_chat-0.0.2.1-py3-none-any.whl
(Caused by
ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection
object at 0x00000228C6A15340>, 'Connection to files.pythonhosted.org
timed out. (connect timeout=15)'))
I have already tried the following solution that I found on stack, but it doesn't work and I get the same error:
pip install --trusted-host=pypi.python.org --trusted-host=pypi.org --trusted-host=files.pythonhosted.org --upgrade --proxy=http://127.0.0.1:3128 [package name]
pip install --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org [package name]
I use a windows system and sublime as my regular coding environment.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我遇到了这个问题,如果您使用VPN并重试,它将起作用。
I had this problem, if you use VPN and try again it will work .
它可能是由于网络防火墙设置而发生的,请尝试连接到其他网络,然后运行命令。为我工作。
It can happen due network firewall settings, try to connect to other network and then run the command. Worked for me.