python
install_error
ai_generated
true
ERROR: Invalid archive format: /tmp/pip-install-xxx/package.tar.gz
ID: python/pip-invalid-archive-format
80%Fix Rate
85%Confidence
0Evidence
2024-11-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 3.9 | active | — | — | — |
Root Cause
The downloaded package archive is corrupted or not a valid tar.gz file.
generic中文
下载的包归档文件损坏或不是有效的tar.gz文件。
Workarounds
-
85% success Clear pip cache and retry with different index
pip cache purge pip install package -i https://pypi.org/simple/
-
80% success Download and install from a local wheel
pip download package pip install ./package.whl
Dead Ends
Common approaches that don't work:
-
Re-running pip without cache
70% fail
Redownloads same corrupted file from mirror if issue persists.
-
Manually extracting archive
90% fail
Archive is corrupt; extraction fails.