python
install_error
ai_generated
partial
错误:ResolutionImpossible:ResolutionTooDeep:回溯过深(2000000 次迭代)
ERROR: ResolutionImpossible: ResolutionTooDeep: backtracking too deep (2000000 iterations)
ID: python/pip-dependency-resolution-too-deep
80%修复率
82%置信度
0证据数
2024-10-02首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| 3.8 | active | — | — | — |
| 3.9 | active | — | — | — |
| 3.10 | active | — | — | — |
| 3.11 | active | — | — | — |
| 3.12 | active | — | — | — |
根因分析
pip 解析器在尝试满足大型、约束严格的依赖图时达到了回溯上限。通常由许多包之间过于宽泛或冲突的版本固定引起。
English
pip's resolver hit its backtracking limit while trying to satisfy a large, tightly constrained dependency graph. Usually caused by overly broad or conflicting version pins across many packages.
解决方案
-
88% 成功率
pip install pip-tools pip-compile --resolver=backtracking requirements.in pip install -r requirements.txt
-
82% 成功率
pip install -c constraints.txt core-deps pip install -c constraints.txt app-deps
无效尝试
常见但无效的做法:
-
85% 失败
Legacy resolver picks versions greedily and produces an inconsistent environment that breaks at runtime.
-
80% 失败
Allowing pre-releases expands the search space and worsens backtracking.