pip安装第三方库超时问题

大致报错如下:

……
raise ReadTimeoutError(self._pool, None, “Read timed out.”)
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host=‘files.pythonhosted.org’, port=443): Read timed out.

解决方案

1、对于比较小的库,可以延时处理,命令如下:
pip --default-timeout=100 install 第三方库名

2、更换安装源
如:pip install -i https://pypi.tuna.tsinghua.edu.cn/simple 库名
报错使用这个 :pip install --index-url https://pypi.tuna.tsinghua.edu.cn/simple/ lightgbm

发布了23 篇原创文章 · 获赞 7 · 访问量 1982

猜你喜欢

转载自blog.csdn.net/weixin_44641176/article/details/102633743
今日推荐