python data_error ai_generated true

错误:无效的 wheel 文件名(部分数量错误):'foo-1.0-py3-none-any.whl.whl'

ERROR: Invalid wheel filename (wrong number of parts): 'foo-1.0-py3-none-any.whl.whl'

ID: python/pip-download-error-invalid-wheel-filename

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

版本兼容性

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

根因分析

wheel 文件名不正确,通常是由于双重扩展名或格式错误。手动下载或从配置错误的索引下载时可能发生。

English

A wheel file has an incorrect filename, often due to a double extension or malformed name. This can happen when downloading manually or from a misconfigured index.

generic

解决方案

  1. 95% 成功率
    Re-download the wheel from PyPI using pip download: pip download <package> -d ./wheels.
  2. 98% 成功率
    Install directly from PyPI instead of a local file: pip install <package>.

无效尝试

常见但无效的做法:

  1. 50% 失败

    If the file content is also corrupted, renaming won't help.

  2. 90% 失败

    Doesn't address the invalid filename; pip still rejects it.