pip安装错误-由于EnvironmentError而无法安装软件包

时间:2020-09-01 15:51:43

标签: python python-3.x pip

当我尝试使用pip安装任何东西时,出现以下错误消息。例如,在这里我想升级点子:

$ pip install --upgrade pip
Collecting pip
  WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7febc7ffe810>: Failed to establish a new connection: [Errno -2] Nom ou service inconnu')': /packages/5a/4a/39400ff9b36e719bdf8f31c99fe1fa7842a42fa77432e584f707a5080063/pip-20.2.2-py2.py3-none-any.whl
  WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7febc7ffeb90>: Failed to establish a new connection: [Errno -2] Nom ou service inconnu')': /packages/5a/4a/39400ff9b36e719bdf8f31c99fe1fa7842a42fa77432e584f707a5080063/pip-20.2.2-py2.py3-none-any.whl
  WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7febc7ffeb10>: Failed to establish a new connection: [Errno -2] Nom ou service inconnu')': /packages/5a/4a/39400ff9b36e719bdf8f31c99fe1fa7842a42fa77432e584f707a5080063/pip-20.2.2-py2.py3-none-any.whl
  WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7febc7ffee10>: Failed to establish a new connection: [Errno -2] Nom ou service inconnu')': /packages/5a/4a/39400ff9b36e719bdf8f31c99fe1fa7842a42fa77432e584f707a5080063/pip-20.2.2-py2.py3-none-any.whl
  WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7febc7ffecd0>: Failed to establish a new connection: [Errno -2] Nom ou service inconnu')': /packages/5a/4a/39400ff9b36e719bdf8f31c99fe1fa7842a42fa77432e584f707a5080063/pip-20.2.2-py2.py3-none-any.whl
ERROR: Could not install packages due to an EnvironmentError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Max retries exceeded with url: /packages/5a/4a/39400ff9b36e719bdf8f31c99fe1fa7842a42fa77432e584f707a5080063/pip-20.2.2-py2.py3-none-any.whl (Caused by NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7febc8006990>: Failed to establish a new connection: [Errno -2] Nom ou service inconnu'))

WARNING: You are using pip version 20.1.1; however, version 20.2.2 is available.
You should consider upgrading via the '/home/ranto/.pyenv/versions/3.7.6/envs/vivadata/bin/python3.7 -m pip install --upgrade pip' command.

1 个答案:

答案 0 :(得分:0)

我终于解决了我的问题,这是由于我的人际关系不好... 谢谢