Solvers#
When you install, update, or remove packages, conda must determine which package versions can work together in the same environment. The component that does this is called a solver. This page explains what solver plugins are, which solvers conda supports, and how to check and switch between them.
What are solver plugins?#
Conda does not have a single, built-in solver. Instead, solvers are provided through a plugin system. Each solver is a separate package that registers itself with conda, which means you can:
Use a different solver without changing conda itself.
Install more than one solver side by side.
Configure one solver globally and switch to another for a single command.
Because solvers are independent packages, each one has its own documentation, release schedule, and issue tracker. See the links in each section for solver-specific details.
Available solvers#
The following table summarizes the solvers that work with conda:
Solver |
Package |
Current status |
Planned status |
|---|---|---|---|
|
Available as an optional plugin |
Planned to become the default solver in conda 26.10.0 |
|
|
Current default solver |
Planned to be replaced as the default by |
|
|
Available as an optional plugin |
Note
The default solver can change between conda releases. To see which solver your installation uses, follow the steps in Check which solver is activated.
rattler#
The rattler solver is provided by the conda-rattler-solver package and is
built on rattler, a set of Rust libraries
for working with conda packages.
The rattler solver delegates to the Rust-based rattler library for dependency resolution, which reduces overhead when resolving complex dependency trees. It solves environments faster than libmamba, with the largest improvements on large or heavily constrained environments. The rattler solver is currently in beta and available as an opt-in plugin for testing.
libmamba#
The libmamba solver is provided by the conda-libmamba-solver package. It
uses the solving engine from the mamba project and is the current default
solver in conda. This solver delegates to the C/C++ libsolv library,
which gives it a low memory footprint, fast resolve times, and clear error
messages that identify conflicting constraints directly.
pycosat#
The pycosat solver (historically known as the classic solver) is provided by
the conda-pycosat-solver package. This solver has powered conda since conda's
first release and is based on the pycosat Python bindings for the PicoSAT library.
Choose the pycosat solver when backwards compatibility with existing long-lived environments is important and you need solve results that match the original conda behavior exactly.
Checking which solver is activated#
To see which solver conda currently has configured, run:
conda config --show solver
The command prints the name of the configured solver, such as libmamba. To
see which configuration file the setting comes from, run:
conda config --show-sources
Changing your solver#
To change the solver conda uses for all commands, set the solver
configuration option:
conda config --set solver rattler
Replace rattler with libmamba or pycosat to use a different solver.
Conda saves the setting in your .condarc file. For more information on your
.condarc file, see Using the .condarc conda configuration file.
Note
The solver plugin must be installed in your base environment before you
can select it. For example:
conda install --name base conda-rattler-solver
To return to the default solver, remove the custom solver setting:
conda config --remove-key solver
Use a solver for a single command#
To try a different solver without changing your configuration, use the
--solver flag with conda install, conda create, or
conda update:
conda create --name test-env --solver rattler numpy
This approach is useful for comparing solvers or working around a problem with your default solver while you troubleshoot.
Report issues#
Where to report a problem depends on where it occurs. Solver plugins are developed separately from conda, so report issues in the repository for the solver you are using:
rattler: conda-rattler-solver issues
libmamba: conda-libmamba-solver issues
pycosat: conda-pycosat-solver issues
If you aren't sure whether a problem is caused by the solver or by conda
itself, try the same command with a different solver using the --solver
option (see Use a solver for a single command).
If the result changes, the problem is likely in the solver. Otherwise, report it in the conda issue tracker.