-
Notifications
You must be signed in to change notification settings - Fork 943
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 sync
and uv run --no-project
end up in different version with same requirements
#9514
Comments
Hello Quick update after some additional testing.
On the
In general, I wanted to say that |
So, I think |
The difference is that |
I think #8686 would indeed help though it's definitely a tricky case. |
(Happy to answer any further questions.) |
One more question to be sure I understand well :) My understanding was that, whether you try to resolve the
because In a sense my question is: Do If both do look at the available wheels, I do not understand why the universal resolution (with Is there something I misunderstood there in this "universal" resolution concept? |
I'm not fluent enough in -- Here is (part of) the output of
-- Here is (part of) the output of
-- |
One more experiment. I compiled the version from #8686 and ran
on the So unfortunately, #8686 won't help in that case and the mystery of why my two commands do not behave the same way is still bothering me a bit 🙂 I can provide logs if that can help. |
We look at the |
Thank you, absolutely all clear, now I understand why the two commands end up with different versions 👌 This totally makes sense and is quite clever to get a fast resolution while taking advantage of PyPI API. I must say that the thing that bugs me the most here is that nothing happened in both It is quite funny how |
FYI: the problem on PyTorch side is being taken care of: pytorch/pytorch#141781. No sure when, but this (and #5182 if I understood well) should be fixed in the near future, without having to specify complex version constraints in order to fix in |
Hello
I had an issue with
torch
dependency. I am pretty sure the problem comes fromtorch
and I opened an issue on that matter: pytorch/pytorch#141781However, while investigating my issue I encountered a
uv
behaviour I do not fully understand.The issue can be reproduced with the following very simple
pyproject.toml
:If you
uv sync
with Python 3.8 (either using.python-version
or--python 3.8
option), it fails with the following errorI think this is expected given the issue described here: pytorch/pytorch#141781.
However, the following command succeeds and indicates that uv ends up installing
torch
2.4.1 in this caseIn conclusion:
One feature request:
uv run --no-project
the same way they are printed inuv sync
would have helped me a lot. The only solution to print them today is to use the--verbose
option which is extremely verbose. I use a lot the "uv run --no-project
" command in my unit testing CI jobs, and adding the--verbose
would make the test results and logs difficult to read, whereas I just need the package versions.Two questions:
uv run --no-project --python 3.8 --with "torch"
dependency resolution ends up choosing2.4.1
and not2.5.1
when2.5.1
is identified as compatible with Python 3.8 byuv sync
?--multi-version
preference mode #8686 help avoid this behaviour? (really waiting for this one, it would help on several issues I encountered 😉 )Thank you 🙏
The text was updated successfully, but these errors were encountered: