Concepts
conda package
A conda package is a compressed tarball file (.tar.bz2) or .conda file
It contains:
- system-level libraries.
- Python or other modules.
- executable programs and other components.
- metadata under the
info/
directory. - a collection of files that are installed directly into an
install
prefix.
conda channels
Conda channels are the locations where packages are stored.
They serve as the base for hosting and managing packages.
conda environments
A conda environment is a directory that contains a specific collection of conda packages that you have installed.
Commands
Package
Search
$ conda search <package_name> [--info]
$ conda search python
$ conda search --full-name python
$ conda search --override-channels --channel defaults scipy
Install
$ conda install --name <env_name> <package_name>
$ conda install <package_name> # current environment
$ conda install [--channel <channel_name>] <package_name>
$ conda install -c <package_name> # from Anaconda.org
$ conda install "PKGNAME[version='3.1.2|3.1.4']"
$ conda install "PKGNAME>2.5,<3.2"
List
Info
Update
Clean
Channel
Add
Environment
Create
$ conda create --name <env_name>
$ conda create -n <env_name> python=3.9
$ conda create -n <env_name> pandas=1.3
$ conda create -n <env_name> python=3.9 scipy=0.15.0 astroid babel
$ conda create --no-default-packages -n <env_name> python
$ conda create --prefix ./envs jupyterlab=0.35 matplotlib=3.1 numpy=1.16
Activate & Deactivate
Info
File
Update
Cloning
Configuration
$ conda config --add channels <channel_name>
$ conda config --describe <key>
$ conda config --set <key> <value>
$ conda config --set ssl_verify false
$ conda config --show
$ conda config --show-sources