{
  "id": "python/pip-install-permission-denied-site-packages",
  "signature": "ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: '/usr/local/lib/python3.10/site-packages'",
  "signature_zh": "错误：由于 OSError 无法安装包：[Errno 13] 权限被拒绝：'/usr/local/lib/python3.10/site-packages'",
  "regex": "ERROR:\\ Could\\ not\\ install\\ packages\\ due\\ to\\ an\\ OSError:\\ \\[Errno\\ 13\\]\\ Permission\\ denied:\\ '/usr/local/lib/python3\\.10/site\\-packages'",
  "domain": "python",
  "category": "system_error",
  "subcategory": null,
  "root_cause": "The user lacks write permissions to the system-wide site-packages directory.",
  "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": "May cause permission issues for other users and is not recommended in virtualenvs.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Installs to user site-packages, which may not be in PATH or may conflict with system packages.",
      "fail_rate": 0.4,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.98,
      "how": "python -m venv myenv; source myenv/bin/activate; pip install package",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "pip install --user 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-05",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}