python
config_error
ai_generated
true
错误:包 'pkg' 需要不同的 Python 版本:3.7.4 不在 '>=3.8' 范围内
ERROR: Package 'pkg' requires a different Python: 3.7.4 not in '>=3.8'
ID: python/pip-requires-python-not-satisfied
80%修复率
87%置信度
0证据数
2024-03-28首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| 3.7 | active | — | — | — |
| 3.8 | active | — | — | — |
| 3.9 | active | — | — | — |
根因分析
包的 Requires-Python 元数据排除了当前 Python 版本。
English
The package's Requires-Python metadata excludes the current Python version.
解决方案
-
95% 成功率
python3.8 -m venv venv && source venv/bin/activate && pip install pkg
-
80% 成功率
pip install 'pkg<2.0'
无效尝试
常见但无效的做法:
-
80% 失败
Only affects resolution for downloading; doesn't change the actual interpreter.
-
50% 失败
May break other dependencies; not a quick fix.