-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Description
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:
error: distribution torch==2.5.2+cpu @ 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
(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 ship MarkupSafe-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/cpucan't be installed because it doesn't have a source distribution or wheel for the current platform #9647uv addrejects pytorch from its index when on mac #5182uv pip compile --universalis not universal enough for an x86 mac #7557uv add pyqt5error #7005- uv fails to install correct odrive version on old macOS #8536
- uv lock/add selects package versions not available for current platform #8603
uv add onnxruntimecurrently fails on MacOS #9228- Dependency Resolver Ignores Platform-Specific Version Constraints #9988
- Universal resolution issue with torch cpu / non-cpu #9963
- Can't install torch_scatter wheel from index on OSX #9646
uv lockfinds incorrect wheels for sys_platform == 'darwin' (pytorch) #10059- "uv add PySide6" fails when the latest version doesn't have a wheel for the current platform #10056
- inconsistency between
uv syncanduv pip install#10849