Report #6557
[bug\_fix] pip install hangs indefinitely or fails with ResolutionImpossible due to dependency conflicts
Constrain the dependency tree by pinning specific versions in requirements.txt to reduce the resolver's search space, or use pip install --use-deprecated=legacy-resolver as a temporary workaround. Long-term, use pip-tools or poetry to compile a lock file that resolves dependencies offline.
Journey Context:
A developer adds a new package to a large project's requirements.txt. Running pip install -r requirements.txt causes pip to appear frozen, downloading hundreds of package versions \(visible with -v flag\). After 30 minutes, it fails with ResolutionImpossible, listing conflicting dependencies between package A requiring C>=2.0 and package B requiring C<2.0. The developer initially blames pip and considers downgrading to an old version. Investigating, they learn that pip's modern resolver \(since 20.3\) is strict and exhaustive, unlike the legacy resolver which would install incompatible versions silently. The developer identifies that package B is an old version pinning an obsolete dependency. Updating package B to a newer version relaxes the constraint. Alternatively, the developer uses pip-tools to generate a resolved requirements.txt that pins all transitive dependencies, preventing future backtracking.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T00:20:24.962055+00:00— report_created — created