Incompatibility Issue Between sqlmodel and pydantic-settings #708
-
First Check
Commit to Help
Example CodeI am encountering an issue with the dependencies of `my project`. The error message is as follows:
Because no versions of sqlmodel match >0.0.12,<0.0.13
and sqlmodel (0.0.12) depends on pydantic (>=1.9.0,<2.0.0), sqlmodel (>=0.0.12,<0.0.13) requires pydantic (>=1.9.0,<2.0.0).
And because pydantic-settings (2.1.0) depends on pydantic (>=2.3.0)
and no versions of pydantic-settings match >2.1.0,<3.0.0, sqlmodel (>=0.0.12,<0.0.13) is incompatible with pydantic-settings (>=2.1.0,<3.0.0).
So, because `my project` depends on both pydantic-settings (^2.1.0) and sqlmodel (^0.0.12), version solving failed. Descriptioni am using fastapi with sqlmodel and i need to use pydntic-settings to control my application configuration, but while trying to install that i get the above error Operating SystemWindows Operating System Detailsrunning on window 11 SQLModel Versionsqlmodel = "^0.0.12" Python Versionpython-3.11 Additional ContextNo response |
Beta Was this translation helpful? Give feedback.
Answered by
YuriiMotov
Aug 19, 2025
Replies: 1 comment
-
There is no such problem in current version (0.0.24). |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
YuriiMotov
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is no such problem in current version (0.0.24).
If you need to use Pydantic V1, you don't need to import
pydantic-settings
: https://docs.pydantic.dev/1.10/usage/settings/