我遇到了一个奇怪的问题,我还没有找到解决方案。
我刚刚在新系统上安装了Ubuntu-Budgie,并且正在使用Python 3.6设置开发环境,但是由于某些原因,pip3
在我运行pip3 install
时未在我的项目中安装软件包,它只是挂起。
pip3 install django
Collecting django
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/django/
Retrying (Retry(total=3, 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/django/
我已经卸载并重新安装了pip3,重新启动了PC,但似乎没有任何效果,我在下一步的工作上留了空白。
我不是通过代理进行连接,这只是标准的Internet,并且我可以成功ping通其他站点并查看Internet,因此它不应该是一个整体连接问题。有人有主意吗?
更新
pip3 install django -vvv
Collecting django
1 location(s) to search for versions of django:
* https://pypi.python.org/simple/django/
Getting page https://pypi.python.org/simple/django/
Looking up "https://pypi.python.org/simple/django/" in the cache
Returning cached "301 Moved Permanently" response (ignoring date and etag information)
Looking up "https://pypi.org/simple/django/" in the cache
No cache entry available
Starting new HTTPS connection (1): pypi.org
Incremented Retry for (url='/simple/django/'): Retry(total=4, connect=None, read=None, redirect=None, status=None)
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/django/
Starting new HTTPS connection (2): pypi.org
答案 0 :(得分:1)
前几天我发生了同样的事情。我认为这是互联网问题,但我可以从终端ping并在浏览器上访问网络。但事实证明,这是一个网络问题,当我重新启动PC后,一切正常。
我再次尝试了一次,当它找到合适的互联网连接时(我的互联网有点伪装)它会自行重置。
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