码迷,mamicode.com
首页 > 编程语言 > 详细

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

时间:2020-02-04 00:25:47      阅读:167      评论:0      收藏:0      [点我收藏+]

标签:spm   pool   lin   ror   install   src   社区   span   pre   

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

 
上官瑾文 2018-07-26 14:57:34 浏览45376
 

场景

在用Dockerfile制作镜像的时候总是出现如下错误
技术图片

原因分析

在下载python库的时候,由于国内网络原因,python包的下载速度非常慢,查看pip 文档,只要在 pip的时候控制超时即可, 具体参数为 --default-timeout=100, 后面的时间可以自己指定。

解决

pip install --default-timeout=1000 --no-cache-dir -r requirements.txt

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

标签:spm   pool   lin   ror   install   src   社区   span   pre   

原文地址:https://www.cnblogs.com/chargeworld/p/12258012.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!