解决使用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

目录
相关文章
|
8月前
pip install -U weditor 安装报错 error: subprocess-exited-with-error
pip install -U weditor 安装报错 error: subprocess-exited-with-error
369 0
|
3月前
|
并行计算 Ubuntu 开发工具
Jetson学习笔记(一):jetson 系列镜像下载、烧写、设置散热风扇、中文包、pip、中转英目录、软件源、显示CSI摄像头
关于NVIDIA Jetson系列设备的入门学习笔记,涵盖了从下载镜像、烧录、设置散热风扇、安装中文语言包、配置环境变量、安装CUDA和OpenCV,到显示CSI摄像头和增加Swap交换空间的详细步骤。
153 0
Jetson学习笔记(一):jetson 系列镜像下载、烧写、设置散热风扇、中文包、pip、中转英目录、软件源、显示CSI摄像头
|
4月前
|
Linux Shell Python
centos执行pip3 install etcd3报错
centos执行pip3 install etcd3报错
|
5月前
|
Ubuntu Python
ubuntu build install python3.12 and config pip
该脚本用于在 Ubuntu 上编译安装 Python 3.12,并配置 pip 使用国内镜像源。主要步骤包括安装依赖、下载并解压 Python 源码、编译安装、创建符号链接、配置 pip 源,以及验证安装和更新 pip。通过运行此脚本,可以快速完成 Python 3.12 的安装和配置。
128 0
|
6月前
|
安全 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
359 0
【Python】 已解决:(pip提示)[notice] To update, run: python.exe -m pip install --upgrade pip
|
6月前
|
安全 网络安全 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] 拒绝访
290 0
|
8月前
|
存储 Scala 索引
【零碎知识】pip install 与 conda install 的区别
【零碎知识】pip install 与 conda install 的区别
434 0
|
8月前
|
Unix Linux Python
sudo python -m pip install --upgrade pip
sudo python -m pip install --upgrade pip是一个用于升级Python包管理器pip的命令。这个命令由pip模块提供,它是一个Python包管理器,用于安装、升级和删除Python软件包。--upgrade选项表示要执行升级操作。
283 1
|
8月前
|
Python Windows
解决Python下pip install MySQL-python失败的问题
解决Python下pip install MySQL-python失败的问题
123 0
|
8月前
|
网络安全 C语言 Python
Python【问题 01】pip install MySQL-python==1.2.4b4 依赖安装问题记录及解决
Python【问题 01】pip install MySQL-python==1.2.4b4 依赖安装问题记录及解决
88 0

热门文章

最新文章