# pydantic.errors.PydanticUserError: `BaseSettings` has been moved to the `pydantic-settings` package.

- **ID:** `python/fastapi-pydantic-v1-v2-incompat`
- **Domain:** python
- **Category:** module_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Project upgraded to Pydantic v2 (required by FastAPI 0.100+) but code still imports BaseSettings from pydantic.

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   pip install pydantic-settings
from pydantic_settings import BaseSettings
   ```
2. **** (85% success)
   ```
   class Settings(BaseSettings):
    model_config = SettingsConfigDict(env_file='.env')
   ```

## Dead Ends

- **** — Conflicts with FastAPI's dependency requirement and breaks other packages. (80% fail)
- **** — It's a raised exception, not a warning; import still fails. (90% fail)
