# ModuleNotFoundError: No module named 'pydantic_settings'

- **ID:** `python/fastapi-missing-dependency`
- **Domain:** python
- **Category:** module_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

FastAPI 应用依赖 pydantic-settings 库，但未安装。

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.x | active | — | — |

## Workarounds

1. **** (100% success)
   ```
   pip install pydantic-settings
   ```
2. **** (60% success)
   ```
   from pydantic import BaseSettings 但需要 pydantic v1，或降级
   ```

## Dead Ends

- **** — pydantic 本身不包含 BaseSettings，需要额外安装。 (80% fail)
- **** — 已安装 pydantic 但缺少 pydantic-settings。 (70% fail)
