list installed packages with source info
conda list --show-channel-urls
install a package from specific channel
conda install -c CHANNELNAME PKGNAME
conda install CHANNELNAME::PKGNAME
install package with AND logic
conda install “PKGNAME>2.5,<3.2”
install package with OR logic
conda install “PKGNAME [version=’2.5|3.2’]”
conda config --show-sources
conda config --add channels CHANNELNAME
set default channel for pkg fetching
(targets first channel in channel sources)
conda config --set channel_priority strict
verify conda install and check version
update conda in base environment
conda update -n base conda
install latest anaconda distribution
create a new environment
(tip: name environment descriptively)
conda create --name ENVNAME
activate environment
(do this before installing packages)
list all environments and locations
list all packages + source channels
conda list -n ENVNAME --show-channel-urls
install packages in environment
conda install -n ENVNAME PKGNAME1 PKGNAME 2
remove package from environment
conda uninstall -n ENVNAME PKGNAME
update all packages in environment
conda update --all -n ENVNAME
Cheatsheet
Quick Start
Tip: It is recommended to create a new environment for any new project or workflow.
Channels and Packages
Tip: Package dependencies and platform specifics are automatically resolved when using conda.
Tip: List environments at the beginning of your session. Environments with an asterisk are active.
Working with Conda Environments