-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pip keeps downloading (often multiple times) stuff that it does not really need #9978
Comments
Doesn't the fact that you're using |
Sholdn't pip be able to see if a package is a possible upgrade from its metadata without having to download the whole package? Furthermore, I am pretty sure that this was not happening, then started happening, then got fixed, then now it is starting to happen again. Guess it was with bug #9516. Previously a fix was provided by pull #9522 I believe. |
Unfortunately, the only way pip can get the metadata is by downloading the package... We're tweaking the resolution algorithm based on user feedback. That means that the order in which we explore the space of possible solutions has been changing. There's no "do everything as fast as possible" setting we can apply here, just options to prioritise common problems over uncommon ones, when it comes to fast resolution times. We've not heard many reports from people using |
That seems rather painful. Does it mean that if one succeeds making a package that is mostly data on pypi accounting for a GB, and I need it, I may end up downloading multiple times whenever I try do to an eager upgrade of other packages? It also seems to add up a lot of complication to the design of package managers like pip. Doesn't pypi extract the metadata in any way? At least for own consumption of its very website that seems necessary. |
No, pip caches downloads so you only hit network once. (It should be in you’re case as well, pip may fetch the package multiple times but only actually download once.) |
Unfortunately, can't cache here. Pip caches all the package, not just the metadata. Plus it caches per virtual env, so that the space usage gets multiplied per virtualenv #. |
pip does not cache per virtual environment but per user on your machine. |
Sounds better, but still impossible to do on a travel laptop with very limited ssd where the pip cache easily grows many times larger than all the rest of my home dir. And because it is a travel laptop and I use it in travel, network traffic may get slow and costly. Will advocate a metadata-only cache in another report, I guess. |
|
I’ll close this for now since there really isn’t anything pip can do at this time. Hopefully we can get that through and implemented to improve the distribution download profile. |
Description
On an up to date virtualenv, trying to update spyder and jupyterlab using
I keep seeing over and over the download of packages that are not needed because they are already there:
In many cases the packages are downloaded multiple times at multiple versions:
I believe that a similar eagerness at downloading unneeded stuff had already been present and fixed.
Expected behavior
pip should only download what it actually needs.
pip version
21.1.1
Python version
3.8.5
OS
Ubuntu linux 20.04
How to Reproduce
See description.
Output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: