由于环境错误,无法安装Numpy Getting无法安装软件包:HTTPSConnectionPool

问题描述 投票:0回答:2

无法使用命令提示符在Windows 10系统中安装numpy。我之前已经安装了相同的软件,但是这次却出现以下错误。预先感谢您的帮助。

C:\Users\MyPC>pip install numpy
Collecting numpy
  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 0x0498B778>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed')': /packages/52/2c/bf86d762ae65550dc8a7ab8381ba610bb69af6db619b3755f2b73052c6b9/numpy-1.18.4-cp38-cp38-win32.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 0x049AA6B8>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed')': /packages/52/2c/bf86d762ae65550dc8a7ab8381ba610bb69af6db619b3755f2b73052c6b9/numpy-1.18.4-cp38-cp38-win32.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 0x04A3F028>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed')': /packages/52/2c/bf86d762ae65550dc8a7ab8381ba610bb69af6db619b3755f2b73052c6b9/numpy-1.18.4-cp38-cp38-win32.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 0x04A3F100>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed')': /packages/52/2c/bf86d762ae65550dc8a7ab8381ba610bb69af6db619b3755f2b73052c6b9/numpy-1.18.4-cp38-cp38-win32.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 0x04A3F1D8>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed')': /packages/52/2c/bf86d762ae65550dc8a7ab8381ba610bb69af6db619b3755f2b73052c6b9/numpy-1.18.4-cp38-cp38-win32.whl
ERROR: Could not install packages due to an EnvironmentError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Max retries exceeded with url: /packages/52/2c/bf86d762ae65550dc8a7ab8381ba610bb69af6db619b3755f2b73052c6b9/numpy-1.18.4-cp38-cp38-win32.whl (Caused by NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x04A3F2B0>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed'))
python numpy pycharm window
2个回答
0
投票

此问题在PIP的GitHub问题上被问到:https://github.com/pypa/pip/issues/5448

添加--trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org可能会解决该问题。


0
投票

当我从第一次使用的旧网络安装numpy时,它安装成功。

© www.soinside.com 2019 - 2024. All rights reserved.