Documentation Index
Fetch the complete documentation index at: https://mintlify.com/conda/conda/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Conda can be configured using environment variables prefixed withCONDA_. These variables provide a way to:
- Temporarily override configuration for a single command
- Set system-wide defaults without modifying
.condarcfiles - Configure conda in containerized or CI/CD environments
- Pass configuration to conda programmatically
.condarc files but lower precedence than command-line arguments.
Core Environment Variables
These environment variables are automatically set by conda and used to track the current environment state:Absolute path to the currently active conda environment. This is the primary way to detect if a conda environment is active.Example:
/home/user/miniconda3/envs/myenvName of the currently active environment. For named environments, this is the environment name. For environments created with a path, this is the full path.Example:
myenv or /path/to/envShell level - indicates how many conda environments are currently stacked (activated on top of each other). Starts at 0 when no environment is active, increments with each activation.Example:
1 (one environment active), 2 (stacked environments)The string that is prepended to your shell prompt when an environment is active.Example:
(myenv) Full path to the conda executable being used.Example:
/home/user/miniconda3/bin/condaPath to the Python interpreter in the base conda environment.Example:
/home/user/miniconda3/bin/pythonPath to the root conda installation directory (base environment).Example:
/home/user/miniconda3Configuration Environment Variables
Any configuration parameter in.condarc can be set via environment variables using the format CONDA_<PARAMETER_NAME> (uppercase, with underscores).
Common Configuration Variables
Comma-separated list of channels to use. Overrides the
channels setting in .condarc.Set channel priority to
strict, flexible, or disabled.Path separator-delimited list of directories to search for environments.
Path separator-delimited list of package cache directories.
Specify which solver to use:
libmamba or classic.Override the platform/architecture subdirectory (e.g.,
linux-64, osx-arm64, win-64).Network Configuration
Control SSL certificate verification. Set to
true, false, or a path to a CA bundle.HTTP proxy server URL.
HTTPS proxy server URL.
Behavior Modifiers
Automatically answer yes to all prompts. Set to
true or false.Suppress progress bars and non-essential output.
Control output verbosity. Higher numbers mean more verbose output (0-4).
Output results in JSON format.
Developer Variables
Enable development mode for running conda from source.
Disable all conda plugins except built-in ones.
Disable file locking (useful in some network file systems, but dangerous).
How to Set Environment Variables
Temporary (Current Session Only)
Linux/macOS:Permanent (All Sessions)
Linux/macOS (bash): Add to~/.bashrc or ~/.bash_profile:
~/.zshrc:
- Open System Properties → Advanced → Environment Variables
- Add new User or System variables with
CONDA_prefix
For a Single Command
Linux/macOS:Common Use Cases
CI/CD Pipeline
Configure conda for automated builds:Corporate Proxy Environment
Configure network access through corporate proxy:Cross-Platform Package Creation
Build packages for different platforms:Testing Different Solvers
Quickly test both solvers:Priority and Overrides
Configuration sources are merged in this order (highest to lowest priority):- Command-line flags (e.g.,
--channel conda-forge) - Environment variables (e.g.,
CONDA_CHANNELS) - Environment .condarc (
$CONDA_PREFIX/.condarc) - User .condarc (
~/.condarc) - System .condarc (
$CONDA_ROOT/.condarc)
!important:
Environment Variable String Delimiters
For list parameters, conda uses specific delimiters:- Most lists: Comma (
,) - Path lists (
envs_dirs,pkgs_dirs): OS path separator (:on Unix,;on Windows) - Pinned/disallowed packages: Ampersand (
&)
Checking Environment Variables
View all conda-related environment variables:See Also
- .condarc Configuration - File-based configuration
- Settings Reference - Complete list of all settings
- conda activate - Environment activation details