-
Notifications
You must be signed in to change notification settings - Fork 911
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
Tracking issue: package without source distribution gets an "incomplete" resolution #9711
Comments
One hard thing here is that it requires us to define a set of "required" environments... Like, if we don't see any macOS wheels, then we need to look for a different version of the package that does have macOS wheels. But do we need to find both macOS ARM and x86 wheels? Or is one of the two sufficient? (In the case of PyTorch, if we require x86 wheels, we'll always fail!) |
For example, we could say:
But ignore architecture? (This would be a heuristic, but so would anything.) Even that first condition seems a little tricky, since we don't know what the "max" Python version is. So maybe we'd do like: look at the latest supported version (in the wheels), and then make sure there are wheels for all prior versions? Or we just ignore Python version entirely and focus on on platform. |
I've tried to categorize the linked issues: old mac torch #9988 #7557 #8536 #9228
Similarly, odrive #8536, where a user would like older mac os support. #8536 (comment) is a syntax for solving this, but there's no clear connection between the toml and the problem/solution. For solving this overall, there are two possible intents: I want a separate resolution for torch_scatter #9646 From https://data.pyg.org/whl/torch-2.5.1+cpu.html:
torch #5182 Similar to
5.15.2 has all binaries except arm mac, which only exist on more recent releases. markupsafe #9647 The torch index' mirroring is incomplete, https://pypi.org/project/MarkupSafe/#files has all versions and a source distribution while https://download.pytorch.org/whl/markupsafe/ does not. |
I care (by far) the most about solving the The The |
The idea that @konstin and I are discussing is to only apply this for local versions. |
Sorry, the other example to mention here is #9928 (comment). Our current |
We shipped #10046 which fixes this for PyTorch and packages in the PyTorch ecosystem (i.e., it's limited to inspecting local versions vs. base versions). We may return to this to make it more general in the future. |
Using TensorFlow as an example: if you lock against the CPU index, we choose
2.5.2+cpu
. However,2.5.2+cpu
doesn't have any macOS wheels. So the resulting resolution doesn't work on macOS at all -- you get something like:(If a package-version doesn't have any compatible wheels for the Python requirement, then we skip it; but as long as it has at least one compatible wheel, we "accept" it for all Python versions and platforms.)
As a second example: for
markupsafe==3.0.2
, if you use the PyTorch CPU index, they only shipMarkupSafe-3.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
. So we might pick that version, but then we'd be lacking wheels for anything other than Python 3.13 on Linux.Solving this is quite difficult, but as evidenced by the linked issues, it's a common problem.
A solution might involve something like: determine the set of Python versions and platforms (coarsely-defined: Linux, macOS, Windows) covered by the wheels. If some Python versions or platforms aren't satisfied, we have to fork and look for older / other versions.
uv sync
: Distributionmarkupsafe==3.0.2 @ registry+https://download.pytorch.org/whl/cpu
can't be installed because it doesn't have a source distribution or wheel for the current platform #9647uv add
rejects pytorch from its index when on mac #5182uv pip compile --universal
is not universal enough for an x86 mac #7557uv add pyqt5
error #7005uv add onnxruntime
currently fails on MacOS #9228uv lock
finds incorrect wheels for sys_platform == 'darwin' (pytorch) #10059The text was updated successfully, but these errors were encountered: