Dependency resolution
ID: dependency-resolution
Dependency resolution chooses compatible software package versions and their transitive requirements for a requested installation. It is a constraint satisfaction problem: choosing a version can introduce additional requirements, which may invalidate choices made earlier. Pip uses backtracking to reconsider such choices.[ref]
Dependency Resolution in the pip documentation. How it works, Backtracking and Dealing with dependency conflicts
If requires library at version at least 2 but below 4, and requires at least 3 but below 5, the shared allowed interval is versions at least 3 but below 4. If instead requires at least 4, no single version satisfies both. Downloading more candidates cannot remove that contradiction. Recording the selected versions preserves a solution to those constraints; it does not by itself record all execution conditions.
New to topics? Read the docs here!