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

- **ID:** `python/pip-unsupported-package-format`
- **领域:** python
- **类别:** data_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

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

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 3.9 | active | — | — |
| 3.10 | active | — | — |

## 解决方案

1. **Rename the wheel file correctly** (85% 成功率)
   ```
   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. **Rebuild the wheel with proper metadata** (95% 成功率)
   ```
   Run: python setup.py bdist_wheel (ensures correct naming).
   ```

## 无效尝试

- **Renaming the file to remove the platform tag** — Makes the filename even more invalid. (90% 失败率)
- **Using a different compression format like tar.gz** — Pip expects .whl files for wheels. (80% 失败率)
