Skip to content

Ignore local version identifiers in constraints. #2626

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

senokay
Copy link

@senokay senokay commented Jul 10, 2025

Torch is frequently installed with a local version identifier (e.g. +cu126), but that identifier causes an issue with pip because there is no public package with that identifier unless an explicit alternative index is used. The issue also happens to come with a quite cryptic ResolutionImpossible error (pypa/pip#13422) which completely obscures the actual issue.

Stripping the local version identifier should be safe, as we are only using constraints to ensure that per-model dependencies are aligned with existing installations.

Fun anecdote: Gemini was extensively used to discover the underlying issue. Full transcript here.

Torch is frequently installed with a local version identifier (e.g.
`+cu126`), but that identifier causes an issue with pip because there is
no public package with that identifier unless an explicit alternative
index is used. Stripping the local version identifier should be safe, as
we are only using constraints to ensure that per-model dependencies are
aligned with existing installations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants