Report #84269
[bug\_fix] pip install hangs or fails with ResolutionImpossible after extensive backtracking
Provide a constraints file \(\`pip install -c constraints.txt package\`\) pinning the specific versions of sub-dependencies that satisfy all requirements, or use \`pip-tools\` to compile a resolved dependency tree, or manually downgrade/upgraded the conflicting top-level packages to compatible versions.
Journey Context:
Developer adds a complex package \(e.g., \`apache-airflow\`\) to a project with existing strict pins \(e.g., \`flask==2.0.1\`\). Pip's new resolver \(post-20.3\) enters a combinatorial explosion trying to find versions of sub-dependencies \(like \`jinja2\`, \`werkzeug\`, \`sqlalchemy\`\) that satisfy both the new package's requirements and the existing pins. The process hangs for minutes consuming CPU, or terminates with \`ResolutionImpossible\` citing specific version conflicts. The developer tries \`--force-reinstall\` or clearing the pip cache \(\`pip cache purge\`\), which fails because the issue is logical incompatibility, not corruption. Analyzing the error message reveals the specific packages in conflict \(e.g., \`package A requires C>=2.0, package B requires C<2.0\`\). The fix involves creating a \`constraints.txt\` file specifying a version of the conflicting sub-dependency that satisfies all parents \(e.g., \`C==2.0\` if compatible\), or using \`pip-tools compile\` to generate a locked requirements file that resolves the graph offline, avoiding the backtracking during install.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T00:02:03.561620+00:00— report_created — created