Error database

Solving environment: failed with initial frozen solve (conda)

Conda cannot find a package combination that fits your environment — or is taking forever to try. Use the libmamba solver, prefer conda-forge with strict priority, and install into fresh environments instead of base.

The message you saw
Solving environment: failed with initial frozen solve (conda)

By Updated

The error

Output
Solving environment: failed with initial frozen solve. Retrying with flexible solve.

Often followed after a long wait by:

Output
UnsatisfiableError: The following specifications were found to be incompatible with each other:

Or the solve never finishes at all — the spinner runs for an hour.

What it means

Conda solves a constraint problem across every package in the environment, not only the one you asked for. "Frozen solve" tries to change nothing but the new package; when that fails, "flexible solve" considers upgrading everything, which can take enormous time in a large environment and still fail. Either the constraints truly conflict, or the classic solver is drowning in the search space.

Why it happens

Three compounding causes: an old conda using the slow classic solver; channel mixing — packages from defaults and conda-forge interleaved, which creates subtle incompatibilities the solver grinds against; and installing everything into base, which grows into a hairball where every new package must reconcile with hundreds of old ones.

How to fix it

1. Use the libmamba solver. It is dramatically faster and gives better error messages. Conda 23.10+ ships it as the default; on older installs:

bash
conda update -n base conda
conda install -n base conda-libmamba-solver
conda config --set solver libmamba

If your conda is current, this step is already done — and a still-failing solve means a real conflict, so read the packages named in the error.

2. Create a fresh environment for the task instead of growing base.

bash
conda create -n ml python=3.12
conda activate ml
conda install -c conda-forge numpy pandas scikit-learn

A fresh environment has no history to reconcile; solves are fast and conflicts are real ones.

3. Commit to one channel — conda-forge — with strict priority.

bash
conda config --add channels conda-forge
conda config --set channel_priority strict

Strict priority stops the solver from mixing channel variants of the same package, which removes a whole class of unsatisfiable states (and of broken environments that solve but crash later).

4. Specify the Python version and key packages together. Solves anchored by python=3.12 and the major packages in one command give the solver fewer degrees of freedom than piecemeal installs.

5. If you mix pip into a conda environment, do it last, and lightly. Conda cannot see pip's changes; later conda operations then solve against a fiction. Conda first for the heavy compiled stack, pip afterwards for the pure-Python leftovers.

How to prevent it

Fresh environment per project; conda-forge with strict priority; base kept minimal (conda itself and nothing else); an environment.yml committed to the repo so environments are rebuilt, not archaeologically maintained. Consider Miniforge, which comes preconfigured for exactly this workflow.