I'm trying to install a package (any package) with pip on Ubuntu 18.04 as well as Ubuntu 20.04. However, I end up with the following error message:
$ pip install --upgrade pip
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/pip/
...
This is what I tried and what didn't work:
I eventually scanned through this one below, that although it's for Windows it actually worked on Ubuntu linux too!!
and the way to fix it is then simply disable ipv6 with the following commands, and done!
$ sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
$ sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1