Environment variables#
Environment variables that conda-exec reads, sets, or respects during operation.
conda-exec variables#
CONDA_EXEC_HOMEOverride the base data directory for cached environments. Default:
~/.conda/exec/. Must be an absolute path (or a path starting with~, which is expanded). When set, all cached environments are stored under$CONDA_EXEC_HOME/envs/instead of~/.conda/exec/envs/. Useful for testing or placing the cache on a different filesystem.export CONDA_EXEC_HOME=/scratch/conda-exec conda exec ruff check . # Environment stored at /scratch/conda-exec/envs/ruff--<hash>/
Variables set during tool execution#
PATHModified before the tool process starts. The behavior depends on the
--activateflag:Without
--activate(default): the prefix’sbin/directory (orScripts/on Windows) is prepended toPATH. No other environment variables are changed.With
--activate: full conda activation is applied, which modifiesPATHand may set or unset additional variables (seeCONDA_PREFIXbelow).
CONDA_PREFIXOnly set when
--activateis used. Points to the ephemeral environment prefix (e.g.~/.conda/exec/envs/samtools--7e2d9f04/). Without--activate, this variable is not set.
Standard conda variables#
conda-exec runs within conda’s plugin framework and inherits conda’s
context system. The following standard conda environment variables are
respected through conda.base.context:
CONDA_ALWAYS_YESWhen set to
true, skip confirmation prompts (equivalent to--yeson the command line). Applies toconda exec --clean.CONDA_DRY_RUNWhen set to
true, report what would be done without making changes. Applies toconda exec --clean.CONDA_JSONWhen set to
true, produce JSON output. Applies toconda exec --list.CONDA_SUBDIROverride the platform subdirectory used for package resolution (e.g.
linux-64,osx-arm64). Passed through to the solver.
Path resolution order#
The base data directory is resolved in this order:
CONDA_EXEC_HOMEenvironment variable, if set~/.conda/exec/(primary location on all platforms)On Windows only, if
~/.conda/exec/does not exist:platformdirs.user_data_dir("conda", "conda") / "exec"as a fallback matching conda’s own data directory conventions