Conda¶
Description¶
Conda is an open source package management system and environment management system that runs on Windows, macOS, Linux and z/OS. Conda quickly installs, runs and updates packages and their dependencies.
Get started¶
conda create -n <env name> <package[=<version>]>
conda activate <env name>
conda install <package[=version]>
Cheatsheet¶
Environments¶
Activate an environment:
Deactivates an environment. If in base
, closes conda.
List all environments:
Create a new virtual environment with
Export active environment to a file
Export all environments to its own file:
for env in $(conda env list | cut -d" " -f1); do
if [[ ${env:0:1} == "#" ]] ; then continue; fi;
conda env export -n $env > ${env}.yml
done
Create environment from file
Clone an environment
Remove an environment
List all packages installed (in current environment)
List all packages installed with path
Show history of changes in packages
Packages¶
Install a package (use -f
to force the installation)
Install package(s) specified in a file (like a Python requirements file)
Uninstall a package
Search for a package
Configuration¶
Show configuration
Add channels (use add
instead of append
to put the channel on the top of the list)
Building Packages¶
Install conda build
Build package
Build for other platforms
Install built package
From Pypi¶
Create files
Build for different Python version
Custom Channel¶
Add channel
(re)build the index
Reference¶
- Jordi Deu Pons
- Miguel Grau
- Federica Brando
- Carlos López-Elorduy