python
install_error
ai_generated
true
错误:无效的归档格式:/tmp/pip-install-xxx/package.tar.gz
ERROR: Invalid archive format: /tmp/pip-install-xxx/package.tar.gz
ID: python/pip-invalid-archive-format
80%修复率
85%置信度
0证据数
2024-11-01首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| 3.9 | active | — | — | — |
根因分析
下载的包归档文件损坏或不是有效的tar.gz文件。
English
The downloaded package archive is corrupted or not a valid tar.gz file.
解决方案
-
85% 成功率 Clear pip cache and retry with different index
pip cache purge pip install package -i https://pypi.org/simple/
-
80% 成功率 Download and install from a local wheel
pip download package pip install ./package.whl
无效尝试
常见但无效的做法:
-
Re-running pip without cache
70% 失败
Redownloads same corrupted file from mirror if issue persists.
-
Manually extracting archive
90% 失败
Archive is corrupt; extraction fails.