Reputation: 33
So, I've been over every post of this sort, but none had supplied me with a solution for my condition.
I've just formatted my laptop and installed ubuntu 20.4 LTS. then, I established a pyenv layout and downloaded python3.6.0/3.6.4/3.7.0/3.8.0/3.9.0, and made sure that each of them was accompanied by its' corresponding up-to date pip version. (varies from 9.0.1 for 3.6.0 to 20.2.3 for 3.9.0). (also, no 'system' python version is defined at the moment)
Now, trying to download the package numpy==1.14.2 using pip, I went through every suggestion I could find on the web:
most of those tries where conducted using multiple python (hence corresponding pip) versions as pyenv global.
Each-And-Every-One of those tries ended up this way:
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)",)': /simple/numpy/
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)",)': /simple/numpy/
Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)",)': /simple/numpy/
Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)",)': /simple/numpy/
Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)",)': /simple/numpy/
Could not find a version that satisfies the requirement numpy==1.14.2 (from versions: )
No matching distribution found for numpy==1.14.2
finding it odd, I tried to get other packages* using pip, and realized that it simply wouldn't retrieve any package whatsoever.
* added clarification - this includes simply "pip install numpy" which gave the same error.
suspecting the actual ability to communicate with the server, I pinged it, but all the packets went through and got ACKed.
i kept pursuing this line of thought and tried:
curl https://pypi.org
resulting in:
curl: (28) Operation timed out after 300355 milliseconds with 0 out of 0 bytes received
then tried:
pip install numpy==1.14.2 --proxy http://pypi.org:443
resulting in:
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', RemoteDisconnected('Remote end closed connection without response'))': /simple/numpy/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', RemoteDisconnected('Remote end closed connection without response'))': /simple/numpy/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', RemoteDisconnected('Remote end closed connection without response'))': /simple/numpy/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', timeout('timed out'))': /simple/numpy/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', RemoteDisconnected('Remote end closed connection without response'))': /simple/numpy/
ERROR: Could not find a version that satisfies the requirement numpy==1.14.2 (from versions: none)
ERROR: No matching distribution found for numpy==1.14.2
could anyone please aid an aching soul, trying to establish a simple environment for DRL fun practices? what am I missing here?
thanks in advance
-----Edit-----
In continuance to CoderRambo's remark - it is worth mentioning that the python & corresponding pip versions that I've used are aligned with the limitations described on numpy1.14.2's page: https://pypi.org/project/numpy/1.14.2/
Update - I tried using my smartphone's network data instead of my WIFI connection.....WO AND BEHOLD! it did the trick!
I would actually still like to figure out what exactly is going on here, since I obviously don't intend to use my phone's hotspot each time I need to use pip.
It is worth mentioning that I have successfully used pip with my current WIFI at the past, so I wander what could be the the origin of this issue. is it some inherent change in my network supplier's built in firewall? or is it the newly installed OS?
It is more likely that it's somehow the OS, but Ubuntu comes without a built-in firewall to the best of my knowledge and short googling, and I don't actively (or knowingly) use any proxy server.
suggestions on how to approach this? anyone?
Upvotes: 1
Views: 1406
Reputation: 11
I struggled with this issue for one full day until I found that post: https://github.com/pypa/pip/issues/9508
I added those two lines to my /etc/hosts file and it solved it:
151.101.0.223 pypi.org
151.101.1.63 files.pythonhosted.org
Upvotes: 1
Reputation: 402
I too faced this some time back since I was using my organizations VPN. Are you connected to your company's VPN software(like Cisco Anyconnect ) and trying this ? If so try to disconnect from VPN , connect only to your WIFI and then download. Let me know if that's that case, other wise we can investigate.
Upvotes: 1