在安装python的pip工具时,遇到以下报错[Errno -3] Temporary failure in name resolution',)': /simple/pip/

版权声明:讯客+是一个每天更新的带你薅羊毛的撸羊毛网站,欢迎访问(www.xunkejia.com)。 https://blog.csdn.net/qq_17351077/article/details/77498173
c/apt# pip2 install -U pip
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f74f8bb9050>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/pip/
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f74f8bb9190>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/pip/
Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f74f8bb92d0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/pip/
Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f74f8bb9410>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/pip/
Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f74f8bb9550>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/pip/


以上问题发现原来是DNS配置错误,域名服务器地址是本机IP地址,127.0.0.1,所以修改域名服务器

sudo gedit /etc/resolv.conf 


nameserver  8.8.8.8

nameserver 114.114.114.114




猜你喜欢

转载自blog.csdn.net/qq_17351077/article/details/77498173