-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 selects an unavailable onnxruntime version (1.20.1) despite it not existing on PyPI for the given platform #11274
Comments
You can solve this with: [project]
name = "bugs"
version = "0.1.0"
description = ""
authors = []
requires-python = "==3.9.*"
dependencies = [
"onnxruntime",
] |
Perhaps, I'll give it a shot when I'm at my computer. That being said, it does feel wrong that uv picked a version of the package that is incompatible with the current working interpreter. Also I would like to avoid pinning the python version in my project. |
Of course, but it's inherently a fairly hard problem. The package doesn't publish source distributions and has limited platform support. It's impossible to come up with a resolution that covers all possible platforms. This is a more narrow case, but that's why it isn't working here. We see a version that has support for at least one of the platforms you care about (i.e., platform support for Python 3.10 onward), and we choose that. |
(I agree the experience here should be better; just trying to explain what's going on and why it's difficult. We also don't privilege the currently-running interpreter at all, which I think is correct -- we're solving generically, ignoring your platform, Python version, etc., but also contributes here.) |
I kind of expected this to work: [project]
name = "bugs"
version = "0.1.0"
description = ""
authors = []
requires-python = ">=3.9,<4.0"
dependencies = [
"onnxruntime",
]
[tool.uv]
environments = [
"python_version == '3.9'",
"python_version > '3.9'",
] Which is a nicer solution in that you don't have to change your supported Python range. But it's not working as expected, so looking into that. |
Okay so I don't think this is a uv issue. after discussing with the maintainers of poetry, I've learned that poetry relies on the python-requires value in onnxruntime's project declaration rather than which packages are actually available for my python distribution. uv likely does the same and that seems like a natural and good behavior. I'm closing this ticket consequently. Please refer to the poetry ticket for the exact discussion. |
@dimbleby has kindly opened a PR to amend the issue on onnxruntime's side microsoft/onnxruntime#23604 |
### Description Support for python 3.8 and python 3.9 was dropped at 1.20. Declare the 3.10 requirement in metadata ### Motivation and Context Helps solvers like uv and poetry to build accurate solutions eg see python-poetry/poetry#10151, astral-sh/uv#11274
### Description Support for python 3.8 and python 3.9 was dropped at 1.20. Declare the 3.10 requirement in metadata ### Motivation and Context Helps solvers like uv and poetry to build accurate solutions eg see python-poetry/poetry#10151, astral-sh/uv#11274
Summary
Preface
Note: I have observed the following issue with
poetry
too. Considering I believeuv
shares this issue withpoetry
, I am opening a ticket withuv
too. This ticket will resemble the aforementioned python-poetry/poetry#10151uv
appears to select anonnxruntime
version which is incompatible with my system. With a very minimalpyproject.toml
:uv
selects the1.20.1
onnxruntime
package. This is, however, incompatible with my system, as evidenced by pip index and I would expect a1.19.2
:I have attached the uv.lock file. Notice
I've installed
uv
as per the recommended way via the install script.Platform
Rocky Linux 9.4 (Blue Onyx)
Version
uv 0.5.29
Python version
Python 3.9.18
The text was updated successfully, but these errors were encountered: