-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Open
Labels
C: error messagesImproving error messagesImproving error messagestype: bugA confirmed bug or unintended behaviorA confirmed bug or unintended behavior
Description
Description
When you install a requirement with an extra and are no distributions for that extra you get a slightly misleading message from the installation error.
Expected behavior
Remove the extra from the requirement.
pip version
25.2
Python version
3.14
OS
Linux
How to Reproduce
pip install --dry-run fsrs[optimizer]==6.2.0
Output
Collecting fsrs==6.2.0 (from fsrs[optimizer]==6.2.0)
Using cached fsrs-6.2.0-py3-none-any.whl.metadata (13 kB)
INFO: pip is looking at multiple versions of fsrs[optimizer] to determine which version is compatible with other requirements. This could take a while.
ERROR: Could not find a version that satisfies the requirement torch; extra == "optimizer" (from fsrs[optimizer]) (from versions: none)
ERROR: No matching distribution found for torch; extra == "optimizer"
This line is confusing:
ERROR: No matching distribution found for torch; extra == "optimizer"
It comes directly from the distribution metadata and is used to refer to the fact that torch is an extra of fsrs, but taken out of that context it looks like pip is looking for torch with the extra optimizer. The message should read:
ERROR: No matching distribution found for torch
Code of Conduct
- I agree to follow the PSF Code of Conduct.
joshdavham
Metadata
Metadata
Assignees
Labels
C: error messagesImproving error messagesImproving error messagestype: bugA confirmed bug or unintended behaviorA confirmed bug or unintended behavior