![](/img/trans.png)
[英]Could not install 'pip install pipenv' on windows 10 due to ERROR: Could not install packages due to an OSError: [WinError 2]
[英]Pip Install Package Error: Could not install packages due to an OSError
每当我尝试执行pip install [any package name]
时,我都会收到以下错误:
错误:由于 OSError 无法安装软件包:HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Max retries exceeded with url: /packages/31/58/d97b7af5302e63bfb3881931fda4aaacbbdcbc31257f983c06703d304c1e/streamlit_chat-0.0.2.1- -none-any.whl(由 ConnectTimeoutError 引起(<pip._vendor.urllib3.connection.HTTPSConnection 对象位于 0x00000228C6A15340>,'与 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 [package name]
pip install --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org [package name]
我使用 Windows 系统和 sublime 作为我的常规编码环境。
它可能由于网络防火墙设置而发生,尝试连接到其他网络然后运行命令。 为我工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.