0

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
ViaTech
  • 2,143
  • 1
  • 16
  • 51
  • What happens when you increase the timeout? e.g. `pip3 install django --default-timeout=120` or `PIP_DEFAULT_TIMEOUT=120 pip3 install django` – hoefling Dec 15 '18 at 15:43
  • The same thing. It just takes longer naturally as the timeout is longer – ViaTech Dec 15 '18 at 15:52
  • Hmm, can you run `pip3 install django -vvv` and add the output to the question? There may be some additional output in the verbose mode. – hoefling Dec 15 '18 at 15:57
  • @hoefling, I added the updated output – ViaTech Dec 15 '18 at 16:00
  • I'm out of ideas. I know it doesn't help, but at least I can't reproduce the issue in an `ubuntu:18.04` docker container. Try reaching the pypi.org with e.g. `curl -L https://pypi.org/simple`, do you receive the packages list? – hoefling Dec 15 '18 at 17:43

1 Answers1

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

Sumukha Pk
  • 124
  • 1
  • 7