python
data_error
ai_generated
true
错误:无法安装 pkg-a 和 pkg-b,因为这些包版本有冲突的依赖。
ERROR: Cannot install pkg-a and pkg-b because these package versions have conflicting dependencies.
ID: python/pip-dependency-conflicts
80%修复率
90%置信度
0证据数
2024-10-01首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| 3.7 | active | — | — | — |
| 3.8 | active | — | — | — |
| 3.9 | active | — | — | — |
根因分析
两个包需要共享依赖的不兼容版本。
English
Two packages require incompatible versions of a shared dependency.
解决方案
-
90% 成功率
pip-compile requirements.in && pip install -r requirements.txt
-
85% 成功率
python -m venv venv1 && source venv1/bin/activate && pip install pkg-a
无效尝试
常见但无效的做法:
-
80% 失败
Doesn't resolve the underlying dependency conflict.
-
70% 失败
Will likely break one of the packages.