Linux command
conda-activate 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Activate an environment
conda activate [env_name]
Activate environment
conda activate [/path/to/env]
Activate the base environment
conda activate base
Activate
conda activate [env_name] && conda info --envs
说明
conda activate switches the current shell session to use a specified conda environment, modifying the PATH environment variable and other shell variables to prioritize that environment's binaries, libraries, and packages. This is the primary mechanism for working with isolated conda environments. When an environment is activated, the shell prompt is typically modified to show the active environment name in parentheses, providing a visual indicator of which environment is currently in use. The activation process prepends the environment's bin directory to PATH, sets environment-specific variables like CONDA_PREFIX and CONDA_DEFAULT_ENV, and may execute activation scripts included with certain packages. Conda environments can be activated by name (if stored in the default envs directory) or by full path to the environment directory. The base environment is conda's root environment and is activated by default unless auto_activate_base is disabled in conda configuration. Shell integration must be initialized via conda init for activation to work properly in bash, zsh, fish, or PowerShell.
FAQ
What is the conda-activate command used for?
conda activate switches the current shell session to use a specified conda environment, modifying the PATH environment variable and other shell variables to prioritize that environment's binaries, libraries, and packages. This is the primary mechanism for working with isolated conda environments. When an environment is activated, the shell prompt is typically modified to show the active environment name in parentheses, providing a visual indicator of which environment is currently in use. The activation process prepends the environment's bin directory to PATH, sets environment-specific variables like CONDA_PREFIX and CONDA_DEFAULT_ENV, and may execute activation scripts included with certain packages. Conda environments can be activated by name (if stored in the default envs directory) or by full path to the environment directory. The base environment is conda's root environment and is activated by default unless auto_activate_base is disabled in conda configuration. Shell integration must be initialized via conda init for activation to work properly in bash, zsh, fish, or PowerShell.
How do I run a basic conda-activate example?
Run `conda activate [env_name]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
Where can I find more conda-activate examples?
This page includes 4 examples for conda-activate, plus related commands for nearby Linux tasks.