You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
❯ pip install -c c.txt -r r.txtERROR: Could not find a version that satisfies the requirement requests<2.25.0,>=2.20.0ERROR: No matching distribution found for requests<2.25.0,>=2.20.0
(current master)
❯ pip install https://github.com/pypa/pip/archive/master.zipCollecting https://github.com/pypa/pip/archive/master.zip Downloading https://github.com/pypa/pip/archive/master.zip - 9.1 MB 1.0 MB/s Installing build dependencies ... done Getting requirements to build wheel ... done Preparing wheel metadata ... doneBuilding wheels for collected packages: pip Building wheel for pip (PEP 517) ... done Created wheel for pip: filename=pip-21.1.dev0-py3-none-any.whl size=1527251 sha256=be7f25a24d8c1d44d168e9dde7b602e14e5d20f6880b33ac455d56cf1afaa039 Stored in directory: /private/var/folders/4d/bt0_xfx56bjfmmt2bv3r5_qh0000gn/T/pip-ephem-wheel-cache-h4ll96js/wheels/b2/f0/ae/286fb76d950bd0a0d20bcabbda0f56531389ed5030f038f6b9Successfully built pipInstalling collected packages: pip Attempting uninstall: pip Found existing installation: pip 21.0.1 Uninstalling pip-21.0.1: Successfully uninstalled pip-21.0.1Successfully installed pip-21.1.dev0
❯ pip install -c c.txt -r r.txt ERROR: Cannot install requests<2.25.0 and >=2.20.0 because these package versions have conflicting dependencies.The conflict is caused by: The user requested requests<2.25.0 and >=2.20.0 The user requested (constraint) requests==2.25.0To fix this you could try to:1. loosen the range of package versions you've specified2. remove package versions to allow pip attempt to solve the dependency conflictERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
What did you want to do?
Consider the following
requirements.txt
andconstraints.txt
files:You'll note that I'm saying the upper cap should be
<2.25.0
inrequirements.txt
and that it should be==2.25.0
inconstraints.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
I expected either the command to fail with a more helpful error message (e.g.
There are conflicting constraints for the requirement requests
) or forpip
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.
The text was updated successfully, but these errors were encountered: