python data_error ai_generated true

错误:pip._vendor.packaging.utils.InvalidWheelName:无效的 wheel 文件名:mypackage-1.0.0-py3-none-any.whl(缺少平台标签)

ERROR: pip._vendor.packaging.utils.InvalidWheelName: Invalid wheel filename: mypackage-1.0.0-py3-none-any.whl (missing platform tag)

ID: python/pip-unsupported-package-format

其他格式: JSON · Markdown 中文 · English
80%修复率
85%置信度
0证据数
2025-09-10首次发现

版本兼容性

版本状态引入弃用备注
3.9 active — — —
3.10 active — — —

根因分析

wheel 文件名不符合 PEP 427 命名约定,例如缺少或格式错误的标签。

English

The wheel filename does not conform to PEP 427 naming convention, e.g., missing or malformed tags.

generic

解决方案

  1. 85% 成功率 Rename the wheel file correctly
    Ensure filename is like 'mypackage-1.0.0-py3-none-any.whl' (correct: mypackage-1.0.0-py3-none-any.whl is actually valid; the error is about missing platform tag, but 'any' is a valid platform. If error persists, check tags.)
  2. 95% 成功率 Rebuild the wheel with proper metadata
    Run: python setup.py bdist_wheel (ensures correct naming).

无效尝试

常见但无效的做法:

  1. Renaming the file to remove the platform tag 90% 失败

    Makes the filename even more invalid.

  2. Using a different compression format like tar.gz 80% 失败

    Pip expects .whl files for wheels.