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-cache
80%Fix Rate
88%Confidence
0Evidence
2024-04-19First 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
pip's HTTP cache or tmp build directory filled the disk. Common in CI containers with small overlay filesystems, or when the pip cache grows unbounded across many builds.
generic中文
pip 的 HTTP 缓存或临时构建目录填满了磁盘。常见于 overlay 文件系统较小的 CI 容器,或者 pip 缓存在多次构建中无界增长时。
Workarounds
-
95% success
pip cache purge && pip cache dir
-
90% success
export TMPDIR=/mnt/bigdisk/tmp && mkdir -p $TMPDIR && pip install package
-
85% success
pip config set global.cache-dir /tmp/pipcache && pip install --no-cache-dir package
Dead Ends
Common approaches that don't work:
-
60% fail
Disables caching but the build still needs temp space; if /tmp is full it still fails.
-
90% fail
Changes install location but not disk usage; root filesystem is still full.