当前位置:网站首页>【问题记录】pip 安装报错 Failed to establish a new connection
【问题记录】pip 安装报错 Failed to establish a new connection
2022-08-09 03:03:00 【呆呆的猫】
问题:
在安装 mmcv 的时候使用 pip install mmcv 报错如下:
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fee6df12f60>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/mmcv/

解决方案:
输入如下代码:
sudo echo "nameserver 8.8.8.8" | tee /etc/resolv.conf > /dev/null
Collecting mmcv
Downloading mmcv-1.6.1.tar.gz (563 kB)
|████████████████████████████████| 563 kB 986 kB/s
Collecting addict
Downloading addict-2.4.0-py3-none-any.whl (3.8 kB)
Requirement already satisfied: numpy in /usr/local/lib/python3.8/dist-packages (from mmcv) (1.19.5)
Requirement already satisfied: packaging in /usr/local/lib/python3.8/dist-packages (from mmcv) (20.9)
Requirement already satisfied: Pillow in /usr/local/lib/python3.8/dist-packages (from mmcv) (8.1.2)
Requirement already satisfied: pyyaml in /usr/local/lib/python3.8/dist-packages (from mmcv) (5.4.1)
Collecting yapf
Downloading yapf-0.32.0-py2.py3-none-any.whl (190 kB)
|████████████████████████████████| 190 kB 31.8 MB/s
Requirement already satisfied: pyparsing>=2.0.2 in /usr/local/lib/python3.8/dist-packages (from packaging->mmcv) (2.4.7)
Building wheels for collected packages: mmcv
Building wheel for mmcv (setup.py) ... done
Created wheel for mmcv: filename=mmcv-1.6.1-py2.py3-none-any.whl size=860277 sha256=4f25550e01acc52694ddc0d12451bd57a9b2dd7f78f3cc679e54687323517eeb
Stored in directory: /root/.cache/pip/wheels/e3/ac/32/75552e05d1964b2123f074fe3e87c890e9ac83bc2d2c5b59d6
Successfully built mmcv
Installing collected packages: yapf, addict, mmcv
Successfully installed addict-2.4.0 mmcv-1.6.1 yapf-0.32.0
边栏推荐
猜你喜欢

非关系型数据库MongoDB:(二)副本集部署说明、数据迁移、限制内存、启用mongo认证

Likou Brush Question Record 1.5-----367. Valid perfect squares

Kubernetes:(十五)PV与PVC的《恩怨情仇》

hcip MPLS 实验

7月更新速递 | 产品实验室N+1,EasyV For Unreal上线!

MySQL相关知识 和 数据的存储相关知识

如何实现canal数据同步

多线程 (进阶+初阶)

Kubernetes:(十四)安全机制(一定要做好安全措施哦)

The building had been registry cluster, load balancing
随机推荐
【机器学习】21天挑战赛学习笔记(三)
2022-08-08 第五小组 顾祥全 学习笔记 day31-集合-Junit单元测试
Day021 图书管理系统(对象和数组)
sql语句实现按顺序排序而不是拼音首字母排序
Financial Industry Software Testing Interview Questions (with Answers) | Getting Started Guide
Likou Brush Question Record 1.5-----367. Valid perfect squares
"Lonely Walking on the Moon": Two choices of Duguyue, let a "middleman" become a big hero
多线程 (进阶+初阶)
jsx定义与规则
《独行月球》:独孤月的两次选择,让一个“中间人”成为大英雄
20220527动态规划:零钱兑换
用DFS解决最终幻想13-2时钟谜题
ros入门(安装)
那些关于DOM的常见Hook封装(一)
Kubernetes:(十五)PV与PVC的《恩怨情仇》
2022-08-08 第五小组 顾祥全 学习笔记 day31-集合-IO流-File类
opencv学习入门
C专家编程 第9章 再论数组 9.4 数组片段的下标
pytorch 自定义dataset
【无标题】