ERROR: Could not install packages due to an OSError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443):
Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known'
Collecting matplotlib
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x10271bb20>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known')': /packages/21/37/197e68df384ff694f78d687a49ad39f96c67b8d75718bc61503e1676b617/matplotlib-3.4.3.tar.gz
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x10271bb50>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known')': /packages/21/37/197e68df384ff694f78d687a49ad39f96c67b8d75718bc61503e1676b617/matplotlib-3.4.3.tar.gz
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x10271ba90>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known')': /packages/21/37/197e68df384ff694f78d687a49ad39f96c67b8d75718bc61503e1676b617/matplotlib-3.4.3.tar.gz
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x102731190>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known')': /packages/21/37/197e68df384ff694f78d687a49ad39f96c67b8d75718bc61503e1676b617/matplotlib-3.4.3.tar.gz
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x102731640>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known')': /packages/21/37/197e68df384ff694f78d687a49ad39f96c67b8d75718bc61503e1676b617/matplotlib-3.4.3.tar.gz
ERROR: Could not install packages due to an OSError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Max retries exceeded with url: /packages/21/37/197e68df384ff694f78d687a49ad39f96c67b8d75718bc61503e1676b617/matplotlib-3.4.3.tar.gz (Caused by NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x102731820>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known'))
解决办法:
(base) renfangri@IrvingonedeMacBook-Air 深度学习100例 % pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org matplotlib
Collecting matplotlib
Downloading matplotlib-3.4.3.tar.gz (37.9 MB)
|████████████████████████████████| 37.9 MB 923 kB/s