Installation

BayeSN requires Python 3.10+ and the dependencies outlined below. Please note that special care must be taken when installing the dependencies to allow BayeSN to run on GPUs - please see below.

Dependencies

BayeSN depends on the following packages

  • jax (see note below)

  • numpy

  • matplotlib

  • pandas

  • arviz

  • astropy

  • sncosmo

  • extinction

  • h5py

  • scipy

  • ruamel.yaml

  • tqdm

  • numpyro

If you want to use GPUs, you must take care to install the correct version of jax following instructions below.

Requirements for GPU

  • cudatoolkit > 11.8

  • cudnn > 8.6

  • jax version which matches cudatoolkit/cudnn version, instructions below

To use GPUs, you need to install a version of jax specific for GPUs - the default pip install is CPU only. In addition, the jax version will need to match the version of cudatoolkit and cudnn you have installed. Full installation instructions for jax GPU can be found here: https://github.com/google/jax#installation.

Install development version

BayeSN is also available on Github and can be found here: https://github.com/bayesn/bayesn.

To install, download or clone the repo and run pip install . in the base directory.