{
  "id": "python/pip-venv-no-pip",
  "signature": "/path/to/venv/bin/python: No module named pip",
  "signature_zh": "/path/to/venv/bin/python：没有名为 pip 的模块",
  "regex": "/path/to/venv/bin/python:\\ No\\ module\\ named\\ pip",
  "domain": "python",
  "category": "install_error",
  "subcategory": null,
  "root_cause": "A virtual environment was created without pip (e.g. python -m venv --without-pip, or a broken ensurepip), so pip is unavailable inside it.",
  "root_cause_type": "generic",
  "root_cause_zh": "创建虚拟环境时未包含 pip（例如 python -m venv --without-pip，或 ensurepip 损坏），因此环境内无法使用 pip。",
  "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 is not importable inside the venv, so the command itself fails before it can install anything.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Installs pip for the system Python, not for the broken virtual environment.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "source /path/to/venv/bin/activate\npython -m ensurepip --upgrade\npython -m pip install --upgrade pip",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.98,
      "how": "deactivate || true\nrm -rf /path/to/venv\npython -m venv /path/to/venv\nsource /path/to/venv/bin/activate\npython -m pip --version",
      "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-11-28",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}