Nicholas Pini
11/21/2025, 2:04 PMprefect[aws, docker, shell]==3.2.15 . If I try to install pydantic==2.10 , I get this error:
Package "prefect[client]" is listed as a dependency of itself.
Why?Marvin
11/21/2025, 2:04 PMMarvin
11/21/2025, 2:07 PMpydantic==2.10 resolves to 2.10.0, and Prefect 3.2.15 explicitly excludes that version. Pip’s resolver then backtracks and emits a confusing message mentioning prefect[client] “depending on itself” due to how extras are declared, but the real issue is the version conflict.
Details:
- Prefect 3.2.15 pins pydantic as:
pydantic>=2.9,<3.0.0,!=2.10.0
So forcing pydantic==2.10 (which equals 2.10.0) can’t be satisfied alongside Prefect 3.2.15. See the constraint in pyproject: pyproject.toml (3.2.15).
- The “Package 'prefect[client]' is listed as a dependency of itself” message is a pip resolver artifact when extras and backtracking collide; it’s not an actual circular dependency in Prefect.
What to do:
- If you need pydantic 2.10.x, use 2.10.1+:
pip install "pydantic==2.10.1" "prefect[aws,docker,shell]==3.2.15"
- Or stay on pydantic 2.9.x:
pip install "pydantic<2.10" "prefect[aws,docker,shell]==3.2.15"
- Alternatively, upgrade Prefect to a version that supports pydantic 2.10.x (the pydantic 2.10 compatibility fix landed after 3.2.15; example fix PR: #16076).