How-To: Using Anaconda - Activate a Virtual Conda Environment via Command Line Interface

Question

How do I activate a virtual conda environment from the command line interface?

 

Answer

Note:  To open an Anaconda Prompt in Windows or the Terminal in MacOS, see "How-To: Using Anaconda -  Launch a Virtual Conda Environment via Command Line Interface

1. From the Anaconda Prompt or Terminal command line (CLI) in the base environment, enter "conda info --envs" to list the current environments.

 

command prompt window with "conda info --envs" as an example

 

2. Enter "conda activate <environment_name>" to activate environment.

Example environment:  venv_3_13

command prompt window with "conda activate venv_3_13" as an example