简体   繁体   English

安装 python 包时出现 pip ReadTimeoutError

[英]pip ReadTimeoutError while installing python packages

I am facing this error while trying to install a python package:我在尝试安装 python package 时遇到此错误:

ERROR: Could not install packages due to an EnvironmentError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Max retries exceeded with url: /packages/f2/12/37c09c37d7ac2bdb6169d5b9409a8e64770a997412edcccc689115d63b97/catboost-0.16-cp36-none-manylinux1_x86_64.whl (Caused by ReadTimeoutError("HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out. (read timeout=15)",)) ERROR: Could not install packages due to an EnvironmentError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Max retries exceeded with url: /packages/f2/12/37c09c37d7ac2bdb6169d5b9409a8e64770a997412edcccc689115d63b97/catboost-0.16-cp36-none -manylinux1_x86_64.whl(由 ReadTimeoutError 引起(“HTTPSConnectionPool(host='files.pythonhosted.org', port=443):读取超时。(读取超时=15)”,))

  • My network is not behind any firewall or proxy-server.我的网络不在任何防火墙或代理服务器后面。
  • Also i have tried using --default-timeout=1000 flag in pip command but sometimes it works for me and sometimes it doesn't.我也尝试在 pip 命令中使用--default-timeout=1000标志,但有时它对我有用,有时它不起作用。

I had the same error, it was fixed when I changed pip to pip3 install because I am using python3我有同样的错误,当我将 pip 更改为 pip3 安装时它已修复,因为我使用的是 python3

pip install <package>

make sure it is:确保它是:

pip3 install <package>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM