解决使用Dockerfile来build镜像时pip install遇到的BUG

简介: 解决使用Dockerfile来build镜像时pip install遇到的BUG

错误如下,遇到第二次了,而且看到网上很多回答并不管用,当然也可能是对应的问题不太相同。


Collecting requests (from -r requirements.txt (line 1))


Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f443a504350>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/requests/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by


'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f443a504990>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/requests/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by


'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f443a504390>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/requests/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by


'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f443a504090>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/requests/
  Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after


connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f443a504a50>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/requests/


解决方法:service docker restart


20190503091605497.png

目录
相关文章
|
10月前
pip install --upgrade transformers
pip install --upgrade transformers
165 1
|
5月前
pip install -U weditor 安装报错 error: subprocess-exited-with-error
pip install -U weditor 安装报错 error: subprocess-exited-with-error
310 0
|
6天前
|
Linux Shell Python
centos执行pip3 install etcd3报错
centos执行pip3 install etcd3报错
|
2月前
|
Ubuntu Python
ubuntu build install python3.12 and config pip
ubuntu 编译安装 python ; 并配置 pip 仓库源
46 0
|
3月前
|
安全 Python
【Python】 已解决:(pip提示)[notice] To update, run: python.exe -m pip install --upgrade pip
【Python】 已解决:(pip提示)[notice] To update, run: python.exe -m pip install --upgrade pip
152 0
【Python】 已解决:(pip提示)[notice] To update, run: python.exe -m pip install --upgrade pip
|
3月前
|
安全 网络安全 Python
【Python】已解决:(pip安装库报错)ERROR: Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访
【Python】已解决:(pip安装库报错)ERROR: Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访
73 0
|
5月前
|
存储 Scala 索引
【零碎知识】pip install 与 conda install 的区别
【零碎知识】pip install 与 conda install 的区别
267 0
|
5月前
|
Unix Linux Python
sudo python -m pip install --upgrade pip
sudo python -m pip install --upgrade pip是一个用于升级Python包管理器pip的命令。这个命令由pip模块提供,它是一个Python包管理器,用于安装、升级和删除Python软件包。--upgrade选项表示要执行升级操作。
201 1
|
5月前
|
Python Windows
解决Python下pip install MySQL-python失败的问题
解决Python下pip install MySQL-python失败的问题
76 0
|
5月前
|
网络安全 C语言 Python
Python【问题 01】pip install MySQL-python==1.2.4b4 依赖安装问题记录及解决
Python【问题 01】pip install MySQL-python==1.2.4b4 依赖安装问题记录及解决
63 0
下一篇
无影云桌面