# 错误：无效存档：/path/to/package.tar.gz - 不是有效的 gzip 文件

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

## 根因

下载的存档已损坏或不是预期的 gzip 格式。

## 版本兼容性

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

## 解决方案

1. **Download the package from an alternative source** (85% 成功率)
   ```
   Use a different PyPI mirror: pip install -i https://pypi.org/simple/ package
   ```
2. **Clear pip cache and retry** (80% 成功率)
   ```
   Run: pip cache purge; then pip install package
   ```

## 无效尝试

- **Re-downloading the same file from the same source** — If the source is corrupted, re-downloading won't help. (80% 失败率)
- **Using a different decompression tool like 7zip** — The file itself is invalid, not a decompression issue. (90% 失败率)
