Skip to content

Instantly share code, notes, and snippets.

@CihanSoylu
Created January 11, 2020 22:43
Show Gist options
  • Save CihanSoylu/fd106b469280f4ad389c44d6465fe877 to your computer and use it in GitHub Desktop.
Save CihanSoylu/fd106b469280f4ad389c44d6465fe877 to your computer and use it in GitHub Desktop.
Useful conda commands
#List conda environments
conda env list
#Activate an environment
conda activate <env_name>
#Deactivate an environment
conda deactivate
#Create an environment
conda create --name <new_env_name>
#Remove an environment
conda env remove -n <env_name>
#List libraries installed in an environment
conda list
#Write the installed libraries into a txt file.
conda list -e > <requirements>.txt
#Create a new environment from a .txt file
conda create --name <new_env_name> --file <requirements>.txt
#Create a .yml file
conda env export > <env_name>.yml
#Create a new environment from a .yml file
conda env create -f <env_name>.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment