【问题记录】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

安装成功:

在这里插入图片描述

本文来自网络,不代表协通编程立场,如若转载,请注明出处:https://www.net2asp.com/715b7df391.html