{
  "id": "python/starlette-import-error-no-module-named-starlette",
  "signature": "ModuleNotFoundError: No module named 'starlette'",
  "signature_zh": "ModuleNotFoundError: 没有名为 'starlette' 的模块",
  "regex": "ModuleNotFoundError:\\ No\\ module\\ named\\ 'starlette'",
  "domain": "python",
  "category": "module_error",
  "subcategory": null,
  "root_cause": "Starlette is not installed in the current Python environment.",
  "root_cause_type": "generic",
  "root_cause_zh": "当前 Python 环境中未安装 Starlette。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Installing starlette with pip but using a virtual environment not activated.",
      "why_fails": "If the virtual environment is not activated, the package is installed in the system Python, not the project's environment.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "Assuming starlette is included with FastAPI.",
      "why_fails": "FastAPI depends on Starlette, but if you install only FastAPI, Starlette is installed as a dependency. However, if you uninstall FastAPI, Starlette may also be removed.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Install Starlette using pip.",
      "success_rate": 0.95,
      "how": "pip install starlette",
      "condition": "",
      "sources": []
    },
    {
      "action": "Install FastAPI which includes Starlette.",
      "success_rate": 0.9,
      "how": "pip install fastapi",
      "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.85,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-01-20",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}