前几天我也发生了同样的事情。我认为这是一个互联网问题,但我可以从终端ping,并在浏览器上访问web。但事实证明这是一个网络问题,在我重启电脑后,一切都很好。
我又试了一次,当它找到一个合适的网络连接时,它就自己重置了(我这里的网络有点劣质)。
Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved. PS C:\Users\SUMUKHAs PC> pip install django Collecting django Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x00000237E11C7FD0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/django/ Operation cancelled by user PS C:\Users\SUMUKHAs PC> pip install scikit-learn Collecting scikit-learn Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/scikit-learn/ Downloading https://files.pythonhosted.org/packages/74/fc/e3d24a3472e32102f9f667adf05a41fdd5b56893f34464f06c8549684cd5/scikit_learn-0.20.1-cp37-cp37m-win_amd64.whl (4.8MB) Operation cancelled by user PS C:\Users\SUMUKHAs PC> pip install scikit-learn Collecting scikit-learn Downloading https://files.pythonhosted.org/packages/74/fc/e3d24a3472e32102f9f667adf05a41fdd5b56893f34464f06c8549684cd5/scikit_learn-0.20.1-cp37-cp37m-win_amd64.whl (4.8MB) 9% |âââ | 471kB 2.7kB/s eta 0:26:16