Report #84676
[bug\_fix] Pip dependency resolver hangs indefinitely or fails with ResolutionImpossible due to conflicting version constraints
Upgrade pip to the latest version first. Then, explicitly constrain the conflicting transitive dependencies in your requirements.txt or a constraints file \(e.g., \`echo 'conflicting-package<2.0' >> constraints.txt\` and \`pip install -c constraints.txt -r requirements.txt\`\). Pin direct dependencies to versions with compatible transitive constraints to reduce the search space.
Journey Context:
Developer adds \`apache-airflow==2.7.0\` to an existing requirements.txt containing \`pandas==1.3.0\`. Running \`pip install -r requirements.txt\` causes pip to consume 4GB of RAM and spin for 45 minutes before crashing with ResolutionImpossible. The verbose output shows pip attempted over 5000 rounds of backtracking on \`numpy\` and \`sqlalchemy\`, trying every historical version to find a combination that satisfies both the old pandas and new airflow. The developer examines the error log and realizes that Airflow 2.7 requires pandas>=2.0 while the pinned pandas==1.3 conflicts. By either upgrading pandas to 2.1 or constraining airflow to an older version compatible with pandas 1.3 in a constraints file, the resolver completes in 10 seconds. The developer learns that pip's strict resolver \(since 20.3\) requires explicit constraint management and that conflicting pins on transitive dependencies cause exponential search time.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T00:43:06.176630+00:00— report_created — created