Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
as written in the title and as you can see in the first image I'm trying to install pandas and I get this error each time and not just pandas but all the libraries , I know this question has been asked but none of the answers that I found helped me .
I'm not using a proxy .
C:\Users\yoooo>pip install pandas
C:\Users\yoooo>pip install pandas WARNING: 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/pandas/ WARNING:
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/pandas/ WARNING:
Retrying (Retry(total=2, 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/pandas/ WARNING:
Retrying (Retry(total=1, 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/pandas/ WARNING:
Retrying (Retry(total=0, 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/pandas/
ERROR: Could not find a version that satisfies the requirement pandas
(from versions: none)
ERROR: No matching distribution found for pandas
error
tried to ping pypi.org and got this
C:\Users\yoooo>ping pypi.org
Pinging pypi.org [2a04:4e42::223] with 32 bytes of data:
Request timed out.
Request timed out.
Reply from 2a04:4e42::223: time=227ms
Reply from 2a04:4e42::223: time=556ms
Ping statistics for 2a04:4e42::223:
Packets: Sent = 4, Received = 2, Lost = 2 (50% loss), Approximate round trip times in milli-seconds:
Minimum = 227ms, Maximum = 556ms, Average = 391ms
pip and python versions (I can't update pip obviously).
C:\Users\yoooo>python --version
Python 3.8.6
C:\Users\yoooo>pip --version
pip 20.2.1
versions
what do you think the problem is ? and if it's caused by my internet provider what should I tell them ?
telling them I'm not able to install python libraries will not be understandable .
tried this and and it led to the same error eventually
C:\Users\yoooo>pip --default-timeout=1000 install pandas
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/pandas/ ...
–
You need to give precedence to IPv4 over IPv6.
To do so, open CMD with administrator permissions and apply the following command:
netsh interface ipv6 set prefixpolicy ::ffff:0:0/96 46 4
–
pip --default-timeout=1000 install pandas
If that doesn't work, download the wheel file from here. Then change directory to where you saved it. Then run:
pip install <.whl file name>
–
–
–
In my case, ubuntu 20.4, changing it to prefer IPv4 over IPV6, resolved the issue.
I was using strace pip install <some packages>
, and noticed that IPv6 is been used (maybe there is a simple way).
this is how I change it to prefer IPv4 over IPV6:
edit the file /etc/gai.conf
and uncomment the line:
precedence ::ffff:0:0/96 100
restart is not required.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.