Environment Commands
The environment is Conda's core. This section covers creating, activating, deactivating and removing environments.
Create an environment
Create myenv with Python 3.11:
conda create -n myenv python=3.11Create from a file (see Export / Import):
conda env create -f environment.ymlList environments
* marks the active environment:
conda env list# orconda info --envsActivate / deactivate
conda activate myenv # enter envconda deactivate # leave current env, back to base💡 If
conda activatesayscommand not found, runsource ~/miniconda3/etc/profile.d/conda.shfirst, or ensureconda initran at install.
Remove an environment
conda env remove -n oldenv -yClone an environment
conda create -n myenv-copy --clone myenvtip
Daily triage three-liner
conda env list # 1. which envs / which is activeconda list # 2. what's installed in current envconda info # 3. Conda root path and channel config