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

简介: 解决pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
+关注继续查看

场景

在用Dockerfile制作镜像的时候总是出现如下错误
image

原因分析

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

解决

pip install --default-timeout=1000 --no-cache-dir -r requirements.txt
目录
相关文章
|
8天前
问题提解决:ERROR: Could not install packages due to an OSError: HTTPSConnectionPool(host=‘files.pythonhos
问题提解决:ERROR: Could not install packages due to an OSError: HTTPSConnectionPool(host=‘files.pythonhos
|
1月前
|
Python
ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
|
1月前
|
Python
pip安装模块报错ReadTimeoutError: HTTPSConnectionPool(host=‘files.pythonhosted.org‘, port=443): Read timed
pip安装模块报错ReadTimeoutError: HTTPSConnectionPool(host=‘files.pythonhosted.org‘, port=443): Read timed
|
8月前
|
Python
pip安装第三方库报错WARNING: Retrying (Retry(total=4,connect=None, read=Noneredirect=None,status=None))解决
pip安装第三方库报错WARNING: Retrying (Retry(total=4,connect=None, read=Noneredirect=None,status=None))解决
718 0
pip安装第三方库报错WARNING: Retrying (Retry(total=4,connect=None, read=Noneredirect=None,status=None))解决
|
Web App开发
selenium.common.exceptions.WebDriverException: Message: unable to set cookie
selenium.common.exceptions.WebDriverException: Message: unable to set cookie
204 0
成功解决.ReadTimeoutError: HTTPSConnectionPool(host=‘pypi.tuna.tsinghua.edu.cn‘, port=443): Read timed o
成功解决.ReadTimeoutError: HTTPSConnectionPool(host=‘pypi.tuna.tsinghua.edu.cn‘, port=443): Read timed o
安装baostock插件报错ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read t
安装baostock插件报错ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read t
270 0
|
Java 应用服务中间件 Linux
SpringBoot - Processing of multipart/form-data request failed. Unexpected EOF read on the socket
SpringBoot - Processing of multipart/form-data request failed. Unexpected EOF read on the socket
1091 0
SpringBoot - Processing of multipart/form-data request failed. Unexpected EOF read on the socket
|
Java
Appium问题解决方案(8)- selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Could not sign with default certificate.
Appium问题解决方案(8)- selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Could not sign with default certificate.
760 0
Appium问题解决方案(8)- selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Could not sign with default certificate.
|
Python
pip 安装库失败问题:Retrying (Retry(total=4, connect=None, read=None, redirect=None, status =None)),原因及解决办法
pip 安装库失败问题:Retrying (Retry(total=4, connect=None, read=None, redirect=None, status =None)),原因及解决办法
7448 0
相关产品
云迁移中心
推荐文章
更多