Skip to content

Instantly share code, notes, and snippets.

Last active April 28, 2021 08:43
What would you like to do?

Conda environment commandos

Create environment

conda create --name my_environment python=3
activate my_environment

To find necessary packages for a given script:


For each necessary package we can first search, e.g.

conda search autograd

And then install them, e.g.

conda install autograd
conda install matplotlib
conda install brewer2mpl
conda install pandas
conda install tqdm
conda install scikit-learn
conda install spyder
conda install GPy
pip install GPyOpt

Export the environment file

conda env export > environment.yml

Create environment from file

conda env create -f my_environment.yml

This loads environment from yaml configuration file.

Activate environment

activate my_environment

Deactivate environment


Remove environment

conda remove --name my_environment --all

Update environment from YML file

source activate myenv
conda env update -f=local.yml

List all environments

conda env list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment