/home/pypi/python3/bin/pip3 install --upgrade 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 0x7fbe3db777f0>: Failed to establish a new connection: [Errno -2] 未知的名称或服务’,)’: /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 0x7fbe3db77710>: Failed to establish a new connection: [Errno -2] 未知的名称或服务’,)’: /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 0x7fbe3db779b0>: Failed to establish a new connection: [Errno -2] 未知的名称或服务’,)’: /simple/pip/
^COperation cancelled by user
warning and allow it anyways with ‘–trusted-host pypi.doubanio.com’.
Requirement already up-to-date: pip in /home/pypi/python3/lib/python3.6/site-packages

以上是这次安装的报错信息(类似),网上找了许多方法例如换源,换仓库,都试过之后还是错误,最后翻到一篇文章说是网络问题,之前也试过将xshell6重启还是没用(当时太傻了,xshell只是起连接作用,他的重启与虚拟机无关),然后将虚拟机重启,最后发现可以下载了。

更多推荐