Dependency resolution 2026-11-05
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]
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.
Software dependency 2026-11-05
A software dependency is another component, tool, library or service required for some aspect of a program's construction or operation. Dependencies form a dependency graph; direct requirements can introduce additional transitive requirements. Dependency resolution selects versions satisfying the combined constraints.
For example, if one component requires library versions at least 2 but below 3, while another requires at least 3, no single library version satisfies both in one shared installation. A resolver must report the conflict or use an isolation mechanism that genuinely permits separate versions. Pip documents backtracking through candidate package versions to solve such constraints.[ref] Recording selected versions improves reproducibility, but the operating system, input data and execution settings can still affect the result.
Software package 2026-11-05
A software package is a unit of software distribution or installation, typically containing code, associated files and metadata describing its identity, version and software dependencies. It may contain an application, several software libraries or supporting data. The exact packaging format determines which metadata and installation operations are available.
For example, installing a numerical application can also require installing a compatible array software library. Pip reads requirements from Python distribution files and uses dependency resolution to choose compatible versions.[ref] One distribution unit need not correspond to one importable module. Distinguishing the shipped artifact from the names imported by code avoids assuming that every import name is also an installable package name.