# pydantic.errors.PydanticUserError: `from_orm` is deprecated; use `model_validate` with `from_attributes=True`

- **ID:** `python/fastapi-pydantic-v2-orm-mode`
- **Domain:** python
- **Category:** install_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Pydantic v1 API used with Pydantic v2 installed, typically after upgrading FastAPI.

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   class UserOut(BaseModel):\n    model_config = ConfigDict(from_attributes=True)\n    id: int
   ```
2. **** (90% success)
   ```
   UserOut.model_validate(user_obj)
   ```

## Dead Ends

- **** — FastAPI >=0.100 requires pydantic v2; other errors appear. (70% fail)
- **** — orm_mode is a v1 setting; ignored in v2. (85% fail)
