0

my pip -V returns: pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6)

python3 -V returns: Python 3.6.9

and when I try installing a module using pip I get the following error:

Collecting Django==2.2.1
  Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.python.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.python.org', port=443): Read timed out. (read timeout=15)",)': /simple/django/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out. (read timeout=15)",)': /simple/django/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out. (read timeout=15)",)': /simple/django/
  Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out. (read timeout=15)",)': /simple/django/`

>Could not find a version that satisfies the requirement Django==2.2.1 (from versions: )

>No matching distribution found for Django==2.2.1

and I read similar questions and I checked that I don't have a proxy set, and my firewall is disabled.

What do I do?

tripleee
  • 175,061
  • 34
  • 275
  • 318
sinawic
  • 157
  • 3
  • 14
  • The only reason you would get a network timeout is a network problem. If it's not a proxy or a firewall then something else in that general direction. Is the network cable plugged? – tripleee Feb 04 '20 at 07:04
  • @tripleee It's a VPS and te network must be connected bc I installed other stuff and it worked fine, and I can ping sites. – sinawic Feb 04 '20 at 07:07
  • Can you specifically ping pypi.python.org ( which resolves to 151.101.4.223 for me) ? – ShpielMeister Feb 04 '20 at 07:33
  • @ShpielMeister >PING dualstack.python.map.fastly.net (151.101.12.223) 56(84) bytes of data. >64 bytes from 151.101.12.223 (151.101.12.223): icmp_seq=1 ttl=50 time=107 ms >64 bytes from 151.101.12.223 (151.101.12.223): icmp_seq=2 ttl=50 time=107 ms >64 bytes from 151.101.12.223 (151.101.12.223): icmp_seq=3 ttl=50 time=107 ms >64 bytes from 151.101.12.223 (151.101.12.223): icmp_seq=4 ttl=50 time=108 ms – sinawic Feb 04 '20 at 08:34
  • Does this answer your question? [How to solve ReadTimeoutError: HTTPSConnectionPool(host='pypi.python.org', port=443) with pip?](https://stackoverflow.com/questions/43298872/how-to-solve-readtimeouterror-httpsconnectionpoolhost-pypi-python-org-port) – ShpielMeister Feb 04 '20 at 09:20

1 Answers1

0

"sudo pip install --default-timeout=100 future"

How to solve ReadTimeoutError: HTTPSConnectionPool(host='pypi.python.org', port=443) with pip?

the sudo may or may not be necessary. take care when using sudo.

also: Issues Installing with Pip3

ShpielMeister
  • 1,417
  • 10
  • 23
  • 1
    Advising blindy to use `sudo pip` may break system Python, please consider editing the advice. – Pierre de Buyl Feb 04 '20 at 09:24
  • 1
    I'm not advising it. I'm quoting an accepted answer with 124 upvotes. I stated it may or may not be necessary' . i'm editing to be clearer. thx @PierredeBuyl – ShpielMeister Feb 04 '20 at 09:27