【问题记录】pip install -r requirements.txt 安装失败

一般在使用 pip 安装 python 相关的包的时候,可能会由于网络问题失败

pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.

可以采用国内镜像进行下载安装,复制下面代码重新进行下载安装:

pip install -r requirements.txt -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

安装成功:

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/jiaoyangwm/article/details/129820752