Install environment manager - PanDAWMS/InVEx GitHub Wiki

Conda installation

  • Miniconda (personal recommendation) - minimal installer for conda, includes only conda, Python, the packages they depend on and a small number of other useful packages, including pip, zlib and a few others. https://docs.conda.io/en/latest/miniconda.html
  • Anaconda includes conda, conda-build, Python, and 100+ automatically installed, open source scientific packages and their dependencies that have been tested to work well together, including SciPy, NumPy and many others. https://www.anaconda.com/distribution/

Example of miniconda installation for macOS

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O ~/miniconda.sh
bash ~/miniconda.sh -b -p <PATH_TO_CONDA_DIR>/miniconda
export PATH="<PATH_TO_CONDA_DIR>/miniconda/bin:$PATH"

conda config --set auto_activate_base false
this setting controls whether or not conda activates your base environment when it first starts up

conda activate
conda init (runs once)
conda deactivate (optional, after work is done)

Update base installation

  1. conda update -n base -c defaults conda
  2. conda update conda

Virtual environment within conda

Use <environment_name> as invex

  1. With default packages: conda create --name invex python=3
  2. With predefined packages: conda env create -f environment.yml

Config-file environment.yml (example for the current InVEx installation):

name: invex
channels:
  - conda-forge
  - intel
  - defaults
dependencies:
  - cython=0.29.13
  - daal=2019.4
  - daal4py=2019.4
  - django=2.2.5
  - h5py=2.9.0
  - hdf5=1.10.4
  - kneed=0.4.2
  - numba=0.46.0
  - numpy=1.17.2
  - pandas=0.25.2
  - pip=19.3.1
  - python=3.6.9
  - requests=2.22.0
  - scikit-learn=0.21.3
  - scipy=1.3.1
  - sqlite=3.30.1
  - pip:
    - kmodes==0.10.1

Activate virtual environment

conda activate invex

Packages installation

  1. conda install -n invex <package_name>
  2. conda activate invex; conda install <package_name>

BACKUP

How to Restore Anaconda after Update to MacOS Catalina

https://www.anaconda.com/how-to-restore-anaconda-after-macos-catalina-update/
(discussion thread: https://github.com/ContinuumIO/anaconda-issues/issues/10998)