{
  "id": "python/fastapi-missing-dependency",
  "signature": "ModuleNotFoundError: No module named 'pydantic_settings'",
  "signature_zh": "模块未找到错误：没有名为 'pydantic_settings' 的模块",
  "regex": "ModuleNotFoundError:\\ No\\ module\\ named\\ 'pydantic_settings'",
  "domain": "python",
  "category": "module_error",
  "subcategory": null,
  "root_cause": "FastAPI 应用依赖 pydantic-settings 库，但未安装。",
  "root_cause_type": "generic",
  "root_cause_zh": "FastAPI 应用依赖 pydantic-settings 库，但未安装。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "pydantic 本身不包含 BaseSettings，需要额外安装。",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "已安装 pydantic 但缺少 pydantic-settings。",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 1.0,
      "how": "pip install pydantic-settings",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.6,
      "how": "from pydantic import BaseSettings 但需要 pydantic v1，或降级",
      "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.9,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-09-25",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}