Pip安装程序包错误:由于OSError,无法安装程序包



每当我尝试执行pip install [any package name]:时,都会收到以下错误

错误:由于OSError,无法安装程序包:HTTPSConnectionPool(主机="files.pythonhosted.org",端口=443(:最大url超过重试次数:/软件包/58/d97b7af5302e63bfb3881931fdaaacbbdcbc31257f983c06703d304c1e/streamlit_chat-0.0.2.1-py3-none-any.whl(由ConnectTimeoutError(<pip.vendor.urllib3.connection.HTTPS连接对象位于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系统,并将其作为我的常规编码环境。

我遇到了这个问题,如果你使用VPN并重试,它就会工作。

由于网络防火墙设置,可能会发生这种情况,请尝试连接到其他网络,然后运行该命令。为我工作。

相关内容

最新更新