-
Notifications
You must be signed in to change notification settings - Fork 772
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 pip compile fails with extra-index-url #2775
Comments
For security purposes, we don’t currently allow packages to be looked up on multiple indexes. You can read more on it here: https://github.com/astral-sh/uv/blob/main/PIP_COMPATIBILITY.md#packages-that-exist-on-multiple-indexes In this case my guess is that networkx exists on the PyTorch index, but not at that version, so uv can’t find it. |
Thanks! So until uv supports specifying registries for each package individually, torch is essentially incompatible with uv in certain configurations (when one of the other requirements also lives on the torch registry but not all versions are there)? |
Yeah. There are a few workarounds: you can use direct URLs for the Torch dependencies, and omit the extra index altogether. Or you should be able to use —find-links instead of an extra index, and that would also work around the issue. I’m considering adding an opt-in flag to allow this though. It’s not a technical limitation, but rather a security limitation. |
) ## Summary This partially revives #2135 (with some modifications) to enable users to opt-in to looking for packages across multiple indexes. The behavior is such that, in version selection, we take _any_ compatible version from a "higher-priority" index over the compatible versions of a "lower-priority" index, even if that means we might accept an "older" version. Closes #2775.
uv.toml doesn't seem to respect/support this:
|
@korhojoa - you want |
I am trying to use uv pip compile as a drop-in replacement for pip-compile and am running into issues with how extra-index-url is handled. A minimal working example would be the following requirements.in
running without extra-index-url will error out as it cannot find torch (as expected):
and running with extra-index-url will error out as it seemingly cannot find networkx on the extra-index (it seems not to check the original index?):
I am using the latest uv version (0.1.27). This might be related to existing PyTorch issues here, but it seems those are all related to installing PyTorch, rather than creating a
requirements.txt
usinguv pip compile
.The text was updated successfully, but these errors were encountered: