python
install_error
ai_generated
true
错误:已忽略以下需要不同 Python 版本的版本:2.0.0 Requires-Python >=3.10;2.1.0 Requires-Python >=3.10 错误:找不到满足需求 mypkg 的版本(可用版本:1.9.0)
ERROR: Ignored the following versions that require a different python version: 2.0.0 Requires-Python >=3.10; 2.1.0 Requires-Python >=3.10 ERROR: Could not find a version that satisfies the requirement mypkg (from versions: 1.9.0)
ID: python/pip-requires-python-incompatible
80%修复率
88%置信度
0证据数
2024-06-09首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| 3.x | active | — | — | — |
根因分析
该包的所有近期版本都声明 Requires-Python >=3.10,但当前解释器较旧(如 3.9),因此解析器将它们过滤掉。
English
All recent releases of the package declare Requires-Python >=3.10, but the current interpreter is older (e.g., 3.9), so the resolver filters them out.
解决方案
-
97% 成功率
pyenv install 3.11.9 pyenv local 3.11.9 python -m venv .venv && source .venv/bin/activate python -m pip install mypkg
-
90% 成功率
python -m pip install 'mypkg==1.9.0'
无效尝试
常见但无效的做法:
-
90% 失败
Installs code that uses 3.10+ syntax (match statements, union types) and crashes at import.
-
85% 失败
Pre-releases have the same or stricter Requires-Python; the filter still applies.