{
  "id": "python/pip-permission-denied-site-packages",
  "signature": "ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: '/usr/local/lib/python3.11/site-packages/foo'",
  "signature_zh": "错误：由于 OSError 无法安装包：[Errno 13] 权限被拒绝：'/usr/local/lib/python3.11/site-packages/foo'",
  "regex": "ERROR:\\ Could\\ not\\ install\\ packages\\ due\\ to\\ an\\ OSError:\\ \\[Errno\\ 13\\]\\ Permission\\ denied:\\ '/usr/local/lib/python3\\.11/site\\-packages/foo'",
  "domain": "python",
  "category": "system_error",
  "subcategory": null,
  "root_cause": "Installing into a system-wide site-packages without write permission.",
  "root_cause_type": "generic",
  "root_cause_zh": "在没有写权限的情况下向系统级 site-packages 安装。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Mixes root-owned files into user environment, causing future permission errors and security risks.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Weakens system security and does not address root cause.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "python -m venv .venv && source .venv/bin/activate && pip install foo",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "pip install --user foo",
      "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-09",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}