{
  "id": "python/pip-no-space-left-on-device-cache",
  "signature": "ERROR: Could not install packages due to an OSError: [Errno 28] No space left on device",
  "signature_zh": "错误：由于 OSError 无法安装包：[Errno 28] 设备上没有剩余空间",
  "regex": "ERROR:\\ Could\\ not\\ install\\ packages\\ due\\ to\\ an\\ OSError:\\ \\[Errno\\ 28\\]\\ No\\ space\\ left\\ on\\ device",
  "domain": "python",
  "category": "system_error",
  "subcategory": null,
  "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.",
  "root_cause_type": "generic",
  "root_cause_zh": "pip 的 HTTP 缓存或临时构建目录填满了磁盘。常见于 overlay 文件系统较小的 CI 容器，或者 pip 缓存在多次构建中无界增长时。",
  "versions": [
    {
      "version": "3.8",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.9",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.10",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.11",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.12",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Disables caching but the build still needs temp space; if /tmp is full it still fails.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Changes install location but not disk usage; root filesystem is still full.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "pip cache purge && pip cache dir",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "export TMPDIR=/mnt/bigdisk/tmp && mkdir -p $TMPDIR && pip install package",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "pip config set global.cache-dir /tmp/pipcache && pip install --no-cache-dir package",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.88,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-04-19",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}