Skip to content
Latchkey

conda install: Usage, Options & Common CI Errors

conda install adds packages (and non-Python deps) into a conda environment.

conda installs Python and native dependencies into isolated environments. Its CI reputation is for slow dependency solving and channel-related "not found" errors - both have known mitigations.

What it does

conda install resolves and installs packages from channels (defaults, conda-forge) into a named or active environment, handling native libraries that pip cannot. The classic solver is slow; the libmamba solver (default in recent conda) is much faster and recommended in CI.

Common usage

Terminal
conda install -y numpy pandas
conda install -n myenv -c conda-forge -y scipy
conda install -y --solver=libmamba tensorflow
conda config --set channel_priority strict
conda clean -a -y                                # shrink the image

Common errors in CI

"PackagesNotFoundError: The following packages are not available from current channels" means the package lives on a channel you have not added - add -c conda-forge. A job that appears to hang on "Solving environment:" is the slow classic solver; use --solver=libmamba and channel_priority strict. "CondaHTTPError: HTTP 000 CONNECTION FAILED" is a network/proxy issue against repo.anaconda.com. Always pass -y in CI, and pin versions for reproducibility.

Options

FlagWhat it does
-n <env>Target a named environment
-c <channel>Add a channel (e.g. conda-forge)
-y / --yesAssume yes (required in CI)
--solver=libmambaUse the fast solver
clean -aClear caches to shrink images

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →