2000字范文,分享全网优秀范文,学习好帮手!
2000字范文 > pip install 命令报错Temporary failure in name resolution

pip install 命令报错Temporary failure in name resolution

时间:2023-07-11 15:44:50

相关推荐

pip install 命令报错Temporary failure in name resolution

pip install 命令报如下错误

Collecting labelmeUsing cached /packages/79/a4/01b9500bc62e6930157a37f2fb2522c1797ffa0ad70684a805ec9fa0df6e/labelme-4.5.7.tar.gzCollecting imgviz>=0.11.0 (from labelme)Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fef0dd6e4e0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /packages/e9/71/a57677fcac28dce37869d1798ce1ca3bde44e9eabe016eed928187b888dc/imgviz-1.2.6.tar.gzRetrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fef0dd6e7f0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /packages/e9/71/a57677fcac28dce37869d1798ce1ca3bde44e9eabe016eed928187b888dc/imgviz-1.2.6.tar.gzRetrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fef0dd6e860>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /packages/e9/71/a57677fcac28dce37869d1798ce1ca3bde44e9eabe016eed928187b888dc/imgviz-1.2.6.tar.gzRetrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fef0dd6e630>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /packages/e9/71/a57677fcac28dce37869d1798ce1ca3bde44e9eabe016eed928187b888dc/imgviz-1.2.6.tar.gzRetrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fef0dd6ea58>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /packages/e9/71/a57677fcac28dce37869d1798ce1ca3bde44e9eabe016eed928187b888dc/imgviz-1.2.6.tar.gzException:Traceback (most recent call last):File "/home/wjw/anaconda3/envs/labelme/lib/python3.6/site-packages/pip/_vendor/requests/packages/urllib3/connection.py", line 142, in _new_conn(self.host, self.port), self.timeout, **extra_kw)File "/home/wjw/anaconda3/envs/labelme/lib/python3.6/site-packages/pip/_vendor/requests/packages/urllib3/util/connection.py", line 75, in create_connectionfor res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):File "/home/wjw/anaconda3/envs/labelme/lib/python3.6/socket.py", line 745, in getaddrinfofor res in _socket.getaddrinfo(host, port, family, type, proto, flags):socket.gaierror: [Errno -3] Temporary failure in name resolution

在/etc/resolv.conf文件中添加如下两行,可正常安装

执行命令:

sudo vi /etc/resolv.conf

nameserver 8.8.8.8nameserver 114.114.114.114

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。