Skip to content

Latest commit

 

History

History
70 lines (64 loc) · 1.64 KB

Anaconda.md

File metadata and controls

70 lines (64 loc) · 1.64 KB

Anaconda cheatsheet

General

Update

conda update conda

Clean installation cache

conda clean --all

Environment variables

See managing environments

Environments

List environments

conda info --envs

Create

conda create -n myenv python=2.7 anaconda
  • -n, --name flag indicates the name for the environemt we wish to create
  • python=2.7 indicates our Python version for this environment
  • The trailing anaconda in the end indicates that we wish to initialize our environment with the ‘anaconda’ meta-package. This is entirely optional!

Activate

conda activate myenv

Deactivate

conda deactivate myenv

Remove environment

conda remove --name myenv --all

or

conda env remove --name myenv

Clone

source deactivate # be sure to exit virtual environment first!
conda create --name new_name --clone old_name
conda remove --name old_name --all

Packages

List installed packages

conda list

Lists installed packages in current environment

Install package

# conda install --channel <channel-name> --name <environment-name> <package-name>
conda install cmake -y
  • The -y, --yes flag simply automates the ‘yes’ approval from you to install the packages
  • If you wish to install in another virtual environment, simply use the -n, --name flag
  • -c, --channel indicates additional channel to search for packages if you do not wish to install from default packages

Uninstall package

conda uninstall some_package