Note: This article was translated with the assistance of AI. I wrote the original in Chinese. If you can read Chinese, you are welcome to read the original Chinese version for the most authentic and unfiltered expression.

All commands below are demonstrated on Windows.

Entering a conda environment

1
activate

Exiting

1
deactivate

Creating an environment

1
conda create -n <env>

If you’re using python, you’ll need to run

1
conda create -n <env> python

Entering a specific environment

1
conda activate <env>

Listing packages in the current environment

1
conda list

Installing a specific package

1
conda install <package>

You can also specify a version.

1
conda install <package>=<version>

Viewing available versions

1
conda search numpy

Uninstalling a package

1
conda uninstall <package>

Deleting a virtual environment

Note: you need to exit the virtual environment first before deleting it.

1
conda remove -n <env> --all