{
  "id": "python/pip-install-error-errno-28-no-space-left-on-device",
  "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": "The pip installation fails because the disk partition where pip's cache or site-packages resides has run out of free space. This commonly happens when /tmp or the root filesystem is full.",
  "root_cause_type": "generic",
  "root_cause_zh": "pip 安装失败，因为 pip 缓存或 site-packages 所在磁盘分区空间已满。常见于 /tmp 或根文件系统已满的情况。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Disabling cache does not free existing filesystem space and may still require temporary space for wheel building.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Timeout is unrelated to disk space; the error persists.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Elevated privileges do not create disk space and may write to a different partition but still fail.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "pip cache purge && sudo apt-get clean && rm -rf /tmp/*",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "pip install --target=/mnt/bigdisk/python-packages package_name",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.8,
      "how": "export TMPDIR=/mnt/bigdisk/tmp && pip install package_name",
      "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.85,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-03-15",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}