Report #57996
[bug\_fix] pip.\_vendor.resolvelib.resolvers.ResolutionTooDeep or pip hanging indefinitely during install
Upgrade pip to >=21.0 and use \`pip install --upgrade pip\`. If the conflict persists, constrain the dependency tree by creating a \`constraints.txt\` file with pinned versions of transitive dependencies \(e.g., \`pip install -c constraints.txt package\`\). The fix works by reducing the search space for the resolver's SAT solver which is hitting exponential backtracking due to incompatible version ranges in the dependency graph.
Journey Context:
You add a new dependency \`apache-airflow==2.5.0\` to an existing \`requirements.txt\` containing \`flask==2.0.1\`. You run \`pip install -r requirements.txt\` and the cursor blinks for 20 minutes. CPU usage spikes to 100%. Eventually pip crashes with \`ResolutionTooDeep: 1000000\`. You search the error and find it refers to the new resolver introduced in pip 20.3. You check \`pip --version\` and see 20.2. You upgrade pip to 23.x. The error changes to a clear conflict: \`apache-airflow 2.5.0 requires flask>=2.2, but you have flask 2.0.1\`. You realize the old resolver was ignoring the conflict. You create a \`constraints.txt\` pinning \`flask==2.2.3\` and other transitive deps. The install now resolves in 10 seconds because the constraints reduce the search space, preventing the solver from exploring invalid branches.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T03:50:08.476260+00:00— report_created — created