{
  "id": "python/pip-egg-info-permission-denied",
  "signature": "error: [Errno 13] Permission denied: '/usr/local/lib/python3.11/site-packages/mypkg-1.0.dist-info/METADATA'",
  "signature_zh": "错误：[Errno 13] 权限被拒绝：'/usr/local/lib/python3.11/site-packages/mypkg-1.0.dist-info/METADATA'",
  "regex": "error:\\ \\[Errno\\ 13\\]\\ Permission\\ denied:\\ '/usr/local/lib/python3\\.11/site\\-packages/mypkg\\-1\\.0\\.dist\\-info/METADATA'",
  "domain": "python",
  "category": "system_error",
  "subcategory": null,
  "root_cause": "pip is installing into a system site-packages directory owned by root without sufficient privileges.",
  "root_cause_type": "generic",
  "root_cause_zh": "pip 正在安装到由 root 拥有的系统 site-packages 目录，但没有足够的权限。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Installing as root pollutes the system Python and can break OS tooling; also may still fail on immutable dirs.",
      "fail_rate": 0.4,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Weakens system security and can break other tools relying on permissions.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "--user is ignored when running as root, so it still targets system site-packages.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.99,
      "how": "python3 -m venv .venv\nsource .venv/bin/activate\npip install mypkg",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "python3 -m pip install --user mypkg",
      "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-09-21",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}