{
  "id": "python/pip-no-cache-dir-permission",
  "signature": "ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/root/.cache/pip'",
  "signature_zh": "错误：由于环境错误无法安装包：[Errno 13] 权限被拒绝：'/root/.cache/pip'",
  "regex": "ERROR:\\ Could\\ not\\ install\\ packages\\ due\\ to\\ an\\ EnvironmentError:\\ \\[Errno\\ 13\\]\\ Permission\\ denied:\\ '/root/\\.cache/pip'",
  "domain": "python",
  "category": "system_error",
  "subcategory": null,
  "root_cause": "The user does not have write permission to the pip cache directory, often when running as non-root in a root-owned environment.",
  "root_cause_type": "generic",
  "root_cause_zh": "用户对 pip 缓存目录没有写权限，通常在以非 root 用户运行但目录归 root 所有的环境中出现。",
  "versions": [
    {
      "version": "3.6",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.7",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "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"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "May change ownership and cause permission issues for other users.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "May not be advisable in shared environments.",
      "fail_rate": 0.4,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "pip install --cache-dir $HOME/.cache/pip pkg",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "pip install --no-cache-dir pkg",
      "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-11-20",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}