|
When in Africa, I worked around that problem and many others using a pypi proxy. Today devpi is the standard: https://devpi.net/docs/devpi/devpi/stable/%2Bd/index.html You pip install from it instead of pypi. It will in turn download from pypi and give the result to you. It will also keep itself updated, and you can batch download during the nigh packages you assume you will work. As a result, our entire team always as most packages locally available. Changing machine, location or purging cache didn't mean loosing this benefit. Besides, pip caching wheels doesn't mean it's not making any requests, so it's still a better experience. For big companies, I recommend it anyway: it speeds up the entire team work, CI, allow you to publish private packages, etc. If you can't do that, the next best things is to do "pip download", instead of "pip install", and save the wheels into a hard drive. |
EDIT: And thanks for the tip from godmode2019. I upvoted you both.
However, they don't change the fact that pip by default assumes a decent Internet connection, with its short timeout and no resume on downloads, and thus is unusable with anything less.
Again, IMHO that's simply unacceptable for the official Python package manager.