<@ULVA73B9P> I've installed `prefect[aws, docker, ...
# ask-marvin
n
@Marvin I've installed
prefect[aws, docker, shell]==3.2.15
. If I try to install
pydantic==2.10
, I get this error:
Copy code
Package "prefect[client]" is listed as a dependency of itself.
Why?
m
thought for 196.2 seconds
Short answer: because
pydantic==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:
Copy code
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+:
Copy code
pip install "pydantic==2.10.1" "prefect[aws,docker,shell]==3.2.15"
- Or stay on pydantic 2.9.x:
Copy code
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).