-
Couldn't load subscription status.
- Fork 3.2k
Description
What did you want to do?
Consider the following requirements.txt and constraints.txt files:
$ cat requirements.txt
requests>=2.20.0,<2.25.0
$ cat constraints.txt
requests==2.25.0
You'll note that I'm saying the upper cap should be <2.25.0 in requirements.txt and that it should be ==2.25.0 in constraints.txt. This fails, which does seem reasonable given this is most likely a bug/misconfiguration. However, the error message is not clear and enabling verbose mode doesn't provide any further hints. When there are many requirements and constraints, it can be difficult to identify the root cause.
Output
$ pip install -c constraints.txt -r requirements.txt
ERROR: Could not find a version that satisfies the requirement requests<2.25.0,>=2.20.0
ERROR: No matching distribution found for requests<2.25.0,>=2.20.0
I expected either the command to fail with a more helpful error message (e.g. There are conflicting constraints for the requirement requests) or for pip to configure the allowed range of requirements to the minimal combined range of all requirements and constraints files.
Additional information
I also tried this using the current master commit. Same issue.