the latest version of fastapi install pydantic V1, i expected V2 ? #11594
-
First Check
Commit to Help
Example Coderow = models.Ensign(**data.model_dump()) Descriptionmodel_dump() work only in pydantic V2, if you install latest version of Fastapi you can't do that line. Operating SystemLinux Operating System DetailsNo response FastAPI Versionlastest Pydantic Versionv1 Python Version3.12 Additional ContextNo response |
Beta Was this translation helpful? Give feedback.
Answered by
YuriiMotov
May 17, 2024
Replies: 1 comment
-
Check whether you have a clean environment before you install FastAPI. You probably had Pydantic v1 installed before you ran FastAPI installation. Just checked that pydantic-2.7.1 is installed if you install FastAPI on clean environment |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Kludex
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Check whether you have a clean environment before you install FastAPI. You probably had Pydantic v1 installed before you ran FastAPI installation.
Just checked that pydantic-2.7.1 is installed if you install FastAPI on clean environment