# 错误：无法同时安装 foo==1.2 和 bar==2.0，因为它们的依赖存在冲突。

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

## 根因

两个顶层依赖间接要求共享依赖的不兼容版本。

## 版本兼容性

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

## 解决方案

1. **** (85% 成功率)
   ```
   pip install pip-tools
pip-compile requirements.in
pip-sync
   ```
2. **** (80% 成功率)
   ```
   pip install "foo>=1.0,<2" "bar>=2,<3"
   ```

## 无效尝试

- **** — Forces installation but leaves a broken dependency graph; imports may fail at runtime. (75% 失败率)
- **** — Skips dependencies entirely, causing ModuleNotFoundError later. (80% 失败率)
