python
system_error
ai_generated
true
ERROR: Could not install packages due to an OSError: [Errno 28] No space left on device
ID: python/pip-no-space-left-on-device
80%Fix Rate
88%Confidence
0Evidence
2024-09-25First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 3.8 | active | — | — | — |
| 3.9 | active | — | — | — |
| 3.10 | active | — | — | — |
| 3.11 | active | — | — | — |
| 3.12 | active | — | — | — |
Root Cause
The filesystem hosting the pip cache or the target site-packages has run out of space, often after many wheel downloads accumulate in ~/.cache/pip.
generic中文
承载 pip 缓存或目标 site-packages 的文件系统空间已耗尽,通常是由于 ~/.cache/pip 中积累了大量 wheel 下载。
Workarounds
-
95% success
pip cache purge # or manually rm -rf ~/.cache/pip df -h ~ pip install somepkg
-
90% success
export PIP_CACHE_DIR=/mnt/bigdisk/pip-cache pip install somepkg # or persist it pip config set global.cache-dir /mnt/bigdisk/pip-cache
Dead Ends
Common approaches that don't work:
-
70% fail
Avoids new cache writes but the target site-packages still needs space and may be on the same full volume.
-
90% fail
Upgrading pip itself needs space and does not free any.