{
  "id": "python/pip-module-not-found-no-module-named-pip",
  "signature": "/usr/bin/python3: No module named pip",
  "signature_zh": "/usr/bin/python3：没有名为 pip 的模块",
  "regex": "/usr/bin/python3:\\ No\\ module\\ named\\ pip",
  "domain": "python",
  "category": "module_error",
  "subcategory": null,
  "root_cause": "The interpreter has no pip installed (common on minimal Debian/Ubuntu images where python3-pip is a separate package, or a freshly built/embedded Python without ensurepip).",
  "root_cause_type": "generic",
  "root_cause_zh": "该解释器未安装 pip（常见于精简的 Debian/Ubuntu 镜像中 python3-pip 是单独包，或新编译/嵌入式 Python 未包含 ensurepip）。",
  "versions": [
    {
      "version": "3.8",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.9",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.10",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.11",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.12",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "pip isn't installed, so the command itself fails.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "pip isn't present anywhere on disk.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Only works if that interpreter has pip; the target one still doesn't.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.85,
      "how": "python3 -m ensurepip --upgrade\npython3 -m pip install --upgrade pip",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "sudo apt-get install -y python3-pip  # Debian/Ubuntu\n# or\nsudo dnf install -y python3-pip",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.8,
      "how": "curl -sS https://bootstrap.pypa.io/get-pip.py -o get-pip.py\npython3 get-pip.py",
      "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-02-28",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}