Installation¶
Quick Start¶
- Set up your environment – Create a fresh conda/mamba environment using the cloe-org-environments repository. Then, clone
cloelib:
- Check out the latest release (optional but recommended):
- Install cloelib – Get the core library up and running, either from your clone:
or directly from PyPI (no clone needed):
- Add optional dependencies – Enhance with external codes and tools:
pip install .[camb,classy,comet-emu,euclidemu2,pylevin,mpmath,tensorflow,tf-keras,cosmopower-jax,baccoemu,hiclassy,emantis,pbjcosmo,fastpt,react,mgclassy,FlamingoBaryonResponseEmulator]
Note: Some shells require quoting the argument when brackets are present:
- Install backends not available on PyPI – HMcode2020Emu, MGEmu (needed by the
reactmodule) and mochi_class are only distributed from GitHub, so they cannot be declared as extras of a package published on PyPI. Install the ones you need directly:
pip install "HMcode2020Emu @ git+https://github.com/MariaTsedrik/HMcode2020Emu.git"
pip install "MGemu @ git+https://github.com/nebblu/MGEmus.git"
pip install "mochi_classy @ git+https://github.com/mcataneo/mochi_class_public.git@mochi_classy"
The installation is now complete.
Optional Dependencies¶
Several optional dependencies enhance cloelib capabilities:
pyinstrument– Time profiling for performance optimizationpylevin,mpmath– Required for specific observational probes (e.g., COSEBIs)tensorflow– Needed for certain emulator backends (e.g.,HMCode2020emu)react– Installs the TensorFlow support needed by the ReACT modified-gravity boost module;MGEmuitself must be installed from GitHub (see step 5)baccoemu– Required for BACCOemu nonlinear and baryonic perturbationsFlamingoBaryonResponseEmulator– Required for FLAMINGO baryonic suppression
These are not included in the default installation but can be added as shown above as other external cosmological codes.