python
data_error
ai_generated
true
错误:无效的依赖项:'package==1.0.0.0'
ERROR: Invalid requirement: 'package==1.0.0.0'
ID: python/pip-invalid-requirement-malformed
80%修复率
87%置信度
0证据数
2024-04-05首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| 3.x | active | — | — | — |
根因分析
依赖项字符串中的版本说明符格式错误,或使用了 packaging.version 无法解析的无效版本格式。
English
The version specifier in the requirement string is malformed or uses an invalid version format that packaging.version cannot parse.
解决方案
-
99% 成功率
pip install package==1.0.0
-
90% 成功率
pip install 'package~=1.0.0'
-
85% 成功率
pip index versions package
无效尝试
常见但无效的做法:
-
80% 失败
The issue is the version string itself, not shell quoting.
-
90% 失败
Newer pip still enforces valid version syntax.
-
95% 失败
Force reinstall does not bypass requirement parsing.