conda "Found conflicts! Looking for incompatible packages" in CI
conda’s solver could not find a consistent set of packages and reports conflicts (or spins for a long time on "Solving environment"). Usually two pins are incompatible, channels are mixed without strict priority, or the classic solver is struggling where libmamba would not.
What this error means
conda install/conda env create prints "Found conflicts! Looking for incompatible packages" and either fails or hangs in "Solving environment" for minutes. It is deterministic for the same specs and channels.
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Found conflicts! Looking for incompatible packages.
Package python conflicts for:
tensorflow -> python[version='>=3.9,<3.12']
your-spec -> python=3.12Common causes
Incompatible version pins
A requested package (or Python version) conflicts with what another package supports - here a Python 3.12 pin against a package capped below it.
Mixed channels without strict priority
Pulling from defaults and conda-forge without channel_priority strict lets the solver mix builds that do not agree, exploding the search.
The classic solver struggling
On a large spec set the classic solver can take minutes; libmamba resolves the same problem far faster and reports conflicts more clearly.
How to fix it
Use libmamba and strict channel priority
conda config --set solver libmamba
conda config --set channel_priority strict
conda install -c conda-forge "tensorflow" python=3.11Relax the conflicting pin
- Read which package caps the conflict (the "conflicts for" block).
- Loosen your pin (e.g. drop
python=3.12topython=3.11) so it overlaps. - Pin in an
environment.ymlso the solve is reproducible.
How to prevent it
- Set
solver: libmambaandchannel_priority: strict. - Pin the environment in
environment.ymlwith compatible versions. - Avoid mixing
defaultsandconda-forgeunrestrained.