python
config_error
ai_generated
true
错误:无效的要求:'package_name>=1.0,<2.0'
ERROR: Invalid requirement: 'package_name>=1.0,<2.0'
ID: python/pip-invalid-requirement-specifier
80%修复率
83%置信度
0证据数
2025-03-05首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| 3.8 | active | — | — | — |
| 3.9 | active | — | — | — |
根因分析
需求字符串包含格式错误的版本说明符或无效字符。
English
The requirement string has malformed version specifiers or invalid characters.
解决方案
-
90% 成功率 Use correct PEP 440 specifiers
pip install 'package_name>=1.0,<2.0' (with proper spaces)
-
70% 成功率 Check for typos in package name
Ensure no spaces in name
无效尝试
常见但无效的做法:
-
Removing version specifiers entirely
40% 失败
May install incompatible version.
-
Using single equals sign
60% 失败
Incorrect syntax.