-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
UV upgrades packages inherited with --system-site-packages #4466
Comments
Hi. Is |
(I think this is roughly a known problem, since we don't look at the full |
(Same as #2500.) |
yes it was missing, I updated it in my original post |
Yeah I think the root cause is the same as #2500 — maybe we need a separate issue that tracks that functionality. Otherwise it seems reasonable to keep this open to track this effect. |
I can confirm that the |
It has an effect on |
Ah, understood. EDIT: I now found it's actually documented to be this way in
We're making great use of this "diff install" behavior of pip to minimize venv sizes in our test suite. Each test needs numpy, matplotlib, scipy etc, which are provided through a rich base install (WinPython, similarly Anaconda) and the dependency requirements of the tests are tried to make best use of what's already in there. This way we can typically reduce >200MB full installs to <10MB, which adds up with every test and version thereof. Is there another feature in uv that would allow this kind of diff install scenario in order save disk space? Do you have plans to add it at some point (or have you already decided not to)? If I preinstall a |
Just tried that -- it does not, but IMO it should. |
I have a similar use case to @J3ronimo My org is tied to using vetted Python package distributions such as Anaconda/WinPython in environments that lack access to PyPI. The general idea is to simultaneously:
IMO, |
A cop-out way to get a list of already-satisfied requirements would be to just shell out to |
#7358 (comment) recommended using |
Same as #6880 |
Would a PR for this be welcome?
Currently, no.
This is accurate. #3500 pulled in sys.path from the interpreter but it's not being used at this time. Looking through the code for this, it looks like the changes needed here are:
Based on taking a quick look at things, these aren't particularly complex and I'd be happy to explore doing both these pieces, if a PR for this would be useful/welcome. |
Definitely welcome. I’m happy to answer questions too. |
Hi there, I'm encountering the following behaviour where uv deviates from
pip
and is causing one of our builds to fail: when you create a virtual environment with--system-site-packages
, and then install a package without specifying a version, UV chooses the upgrade path (install the latest version in the virtual environment), whereas pip just uses the older version inherited from the base environment.How to reproduce:
The text was updated successfully, but these errors were encountered: