python data_error ai_generated true

错误:无效的 wheel 文件名:my_package-1.0-py3-none-any.whl

ERROR: Invalid wheel filename: my_package-1.0-py3-none-any.whl

ID: python/pip-invalid-wheel-filename

其他格式: JSON · Markdown 中文 · English
80%修复率
82%置信度
0证据数
2024-04-02首次发现

版本兼容性

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

根因分析

wheel 文件名不符合 PEP 427 命名约定(例如缺少版本或标签分隔符)。

English

The wheel file's name does not follow the PEP 427 naming convention (e.g., missing version or tag separators).

generic

解决方案

  1. 90% 成功率
    python setup.py bdist_wheel --universal  # ensures proper naming
  2. 75% 成功率
    pip install --no-use-pep517 /path/to/my_package-1.0-py3-none-any.whl

无效尝试

常见但无效的做法:

  1. 40% 失败

    If the internal metadata doesn't match, pip may reject it after download.

  2. 95% 失败

    Doesn't address the filename issue; the error persists.