python
data_error
ai_generated
true
错误:mypackage-1.0-py3-none-any.whl 不是有效的 wheel 文件名。
ERROR: mypackage-1.0-py3-none-any.whl is not a valid wheel filename.
ID: python/pip-invalid-wheel-name
80%修复率
85%置信度
0证据数
2024-11-20首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| 3.8 | active | — | — | — |
| 3.9 | active | — | — | — |
| 3.10 | active | — | — | — |
| 3.11 | active | — | — | — |
| 3.12 | active | — | — | — |
根因分析
wheel 文件名不符合 PEP 427 命名约定,通常是由于版本或平台标签不正确。
English
The wheel file name does not follow the PEP 427 naming convention, often due to incorrect versioning or platform tags.
解决方案
-
90% 成功率 Rebuild the wheel with correct naming
python setup.py bdist_wheel --universal
-
85% 成功率 Manually correct the filename per PEP 427
Rename to 'mypackage-1.0.0-py3-none-any.whl' (ensure version is in X.Y.Z format)
无效尝试
常见但无效的做法:
-
Renaming the file to a random name
90% 失败
pip validates the structure; a random name will still fail.
-
Using --no-index flag
80% 失败
This does not bypass filename validation.