Conda

Conda Cheatsheet

Miniconda Installation

Ubuntu/MacOS

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
chmod +x Miniconda3-latest-Linux-x86_64.sh
./Miniconda3-latest-Linux-x86_64.sh
  • yes to Do you wish the installer to initialize Miniconda3 by running conda init?
  • source .bashrc or source .zshrc

Commands

Create Env

commands description
conda env create -f environment.yml create using environemnt.yml file
conda create -n <name> python=3.8 set python version for env

Export Env

commands description
conda env export > environment.yml very dirty file, platform dependent
conda env export --from-history > environment.yml include only those packages that you manually installed

environment.yml file

name: stats2
channels:
  - javascript
dependencies:
  - python=3.6   # or 2.7
  - bokeh=0.9.2
  - numpy=1.9.*
  - nodejs=0.10.*
  - flask

References

installation

  1. https://varhowto.com/install-miniconda-ubuntu-20-04/
  2. https://conda.io/projects/conda/en/latest/user-guide/install/macos.html