{
  "id": "python/module-not-found-pip-internals",
  "signature": "ModuleNotFoundError: No module named 'pip._internal'",
  "signature_zh": "ModuleNotFoundError：找不到模块 'pip._internal'",
  "regex": "ModuleNotFoundError:\\ No\\ module\\ named\\ 'pip\\._internal'",
  "domain": "python",
  "category": "module_error",
  "subcategory": null,
  "root_cause": "pip installation is corrupted or partially removed, often after manual uninstall or failed pip upgrade. The pip package metadata exists but internal modules are missing.",
  "root_cause_type": "generic",
  "root_cause_zh": "pip 安装已损坏或被部分删除，通常发生在手动卸载或 pip 升级失败之后。pip 包的元数据存在，但内部模块丢失。",
  "versions": [
    {
      "version": "3.8-3.12",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "pip itself is broken, so invoking pip fails before it can reinstall itself.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "System package may install a different pip version incompatible with the current virtualenv or Python interpreter.",
      "fail_rate": 0.4,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.85,
      "how": "python -m ensurepip --upgrade && python -m pip install --upgrade pip",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python get-pip.py --force-reinstall",
      "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.87,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-03-15",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}