Conda Cheat Sheet

For the sake of having a single reference for all my notes using conda, I’m listing below my most used conda commands.

UPDATE: I’ll soon be moving this to a linked Google Doc, along with some of my most used bash, Python, numpy, pandas, and matplotlib snippets.

ACTION COMMAND
CONDA UPDATE
update given package: conda update conda
update a package in given env: conda update -n envname package-name
CONDA INFO
conda info summary: conda info
conda environments info: conda info -e
CONDA CREATE
create a new environment: conda create -n envname package1 package 2
create new env with specific package: conda create -n snowflake python=3.6.0 django=1.11
create new env by cloning another: conda create -n snowflakecopy --clone snowflake
CONDA REMOVE
remove an environment: conda remove -n envname --all
test remove environment: conda remove --dry-run -n myenv package1
to remove a package: conda remove -n myenv package1
CONDA INSTALL
install a package in global env conda install package-name
install a package in a given env conda install -n envname package-name
CONDA LIST
display current env's packages: conda list
write to file current env's packages conda list -e > requirements.txt
list packages in given environment conda list -e -n myenv
USEFUL ALIASES
turnon ’source activate’
turnoff ’source deactivate’
cenv ’conda create -p’
cupdate ’conda update conda’