python
config_error
ai_generated
true
错误:无效版本 '1.0.dev0'(期望类似 '1.0' 的版本号)
error: invalid version '1.0.dev0' (expected a version number like '1.0')
ID: python/setuptools-development-version-error
80%修复率
84%置信度
0证据数
2024-05-01首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| 3.5 | active | — | — | — |
| 3.6 | active | — | — | — |
| 3.7 | active | — | — | — |
根因分析
当不使用符合 PEP 440 的版本控制时,setuptools 的版本解析器会拒绝某些预发布格式。
English
setuptools' version parser rejects certain pre-release formats when not using PEP 440 compliant versioning.
解决方案
-
90% 成功率
In setup.py: version='1.0.dev0' # actually PEP 440 allows this; ensure setuptools >= 40.8.0
-
85% 成功率
pip install --upgrade setuptools
无效尝试
常见但无效的做法:
-
30% 失败
Loses the dev marker and may confuse dependency resolution.
-
70% 失败
Deprecated and may cause other issues in modern environments.