Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The following commands may be useful to manage conda environments. Type the following commands in Terminal. For more information, please refer to the "Managing environments" and "Managing packages" sections in the Conda User Guide.

List all of your environments. In the output, your current environment will be marked with an asterisk (*).

Code Block
conda info --envs

or

Code Block
conda env list

To activate a conda environment that was previously created, type (without the angle brackets):

Code Block
conda activate <environment-name>

Deactivate a conda environment once you are finished working with it:

Code Block
conda deactivate

Or, to return to the

...

base

...

environment, type (with no environment specified):

Code Block
conda activate

View a list of packages installed in an environment:

If the environment is not activated, type (without the angle brackets):

Code Block
conda list -n <environment-name>

If the environment was already activated with conda activate earlier:

Code Block
conda list

To see if a specific package is installed in an environment, type (without the angle brackets):

Code Block
conda list -n <environment-name> <package-name>

Or, if the environment was already activated with conda activate earlier, type (without the angle brackets):

Code Block
conda list <package-name>

To install a package in an environment:

Code Block
conda install --name <environment-name> <package-name>

Remove an environment:

Code Block
conda remove --name <environment-name> --all

or

Code Block
conda env remove --name <environment-name>

Using pip in a conda environment

...