大致报错如下:
……
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