# 错误：无法安装 foo==1.0 和 bar==2.0，因为这些包版本存在依赖冲突。ResolutionTooDeep: 2000000

- **ID:** `python/pip-resolution-too-deep`
- **领域:** python
- **类别:** install_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

回溯解析器超过其搜索深度，因为两个或多个软件包需要共享依赖项的互斥版本，形成不可满足的约束图。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 3.x | active | — | — |

## 解决方案

1. **** (85% 成功率)
   ```
   # Inspect the conflict
pip install --dry-run foo==1.0 bar==2.0
# Relax pins to compatible ranges
pip install 'foo>=1.0,<2' 'bar>=2.0,<3'
   ```
2. **** (80% 成功率)
   ```
   pip install uv
uv pip install foo==1.0 bar==2.0
   ```

## 无效尝试

- **** — The constraint set is unsatisfiable; more rounds just burns CPU before failing again. (85% 失败率)
- **** — Skips dependency installation, leaving imports broken at runtime. (70% 失败率)
