{
  "id": "python/pip-permission-denied",
  "signature": "ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/local/lib/python3.11/site-packages/package'",
  "signature_zh": "错误：由于环境错误无法安装包：[Errno 13] 权限被拒绝：'/usr/local/lib/python3.11/site-packages/package'",
  "regex": "ERROR:\\ Could\\ not\\ install\\ packages\\ due\\ to\\ an\\ EnvironmentError:\\ \\[Errno\\ 13\\]\\ Permission\\ denied:\\ '/usr/local/lib/python3\\.11/site\\-packages/package'",
  "domain": "python",
  "category": "system_error",
  "subcategory": null,
  "root_cause": "The user does not have write permissions to the site-packages directory, often due to system Python installation.",
  "root_cause_type": "generic",
  "root_cause_zh": "用户对site-packages目录没有写权限，通常由于系统Python安装。",
  "versions": [
    {
      "version": "3.10",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Risky and may corrupt system packages.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "May break system Python integrity.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Installs to user site but may not be in PATH.",
      "fail_rate": 0.4,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "python -m venv venv && source venv/bin/activate && pip install package",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.8,
      "how": "pip install --user package",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "pipx install 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.89,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-04-22",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}