问题
I am running into a strange issue that I have not been able to find a solution for yet.
I have just installed Ubuntu-Budgie on a new system and I am setting up a dev environment using Python 3.6, but for some reason pip3 is not installing packages in my project when I run pip3 install, it just hangs.
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/
I have uninstalled and reinstalled pip3, restarted my pc, and nothing seems to be working and I am drawing a blank on what to do next.
I am not connecting through a proxy, this is just standard internet, and I can successfully ping other sites and view the internet so it should not be an overall connection issue. Does anybody have an idea?
Update
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
回答1:
This exact same thing happened to me the other day. I figured it was an internet problem but I could ping from terminals and access web on the browser. But as it turned out it was a web problem and after I restarted my PC it worked just fine.
I tried it out again, it just reset on its own when it found a proper internet connection(my internet here is a bit shoddy).
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
来源:https://stackoverflow.com/questions/53794580/issues-installing-with-pip3