The core implementation of celerite is written in C++ so this will need to be compiled to be called from Python. The easiest way for a new user to do this will be by following the directions in the Using conda section below. Power users might be able to eke out a bit more performance by tuning the linear algebra library and installing From Source and following the discussion in A word about LAPACK support.

Using conda

The easiest way to install celerite is using conda (via conda-forge) with the following command:

conda install -c conda-forge celerite

This version of celerite will be linked to the OpenBLAS implementation available on conda-forge. It’s possible that power users might be able to get some extra performance by linking to an implementation that is more tuned for your system (e.g. MKL) by following the instructions in A word about LAPACK support below.


On Windows, celerite is not linked to a LAPACK implementation because OpenBLAS is not available for Windows on conda-forge so users with wide models will need to install from source.

Using pip

celerite can also be installed using pip after installing Eigen:

pip install celerite

If the Eigen headers can’t be found, you can hint the include directory as follows:

pip install celerite \
    --global-option=build_ext \

From Source

The source code for celerite can be downloaded from GitHub by running

git clone


For the Python interface, you’ll (obviously) need a Python installation and I recommend conda if you don’t already have your own opinions.

After installing Python, the following dependencies are required to build celerite:

  1. Eigen is required for matrix computations,
  2. NumPy for math and linear algebra in Python, and
  3. pybind11 for the Python–C++ interface.

If you’re using conda, you can install all of the dependencies with the following command:

conda install -c conda-forge eigen numpy pybind11


After installing the dependencies, you can build the celerite module by running:

python install

in the root directory of the source tree. If the Eigen headers can’t be found, you can hint the include directory as follows:

python build_ext -I/path/to/eigen3 install

A word about LAPACK support

You can get a substantial speed up of the algorithm for models with a large number of terms if you link to a LAPACK library tuned for your system. The conda package described above will link to the linear algebra used by NumPy on macOS and Linux but, if you’re installing from source, you’ll need to request LAPACK support explicitly using:

python install --lapack

This will again link to the LAPACK implementation used by your NumPy installation. If you want to link to a custom implementation, you can set the WITH_LAPACK macro and provide the compiler and linker flags yourself. For example, to link to Apple’s Accelerate framework on macOS, you could use the following:

CFLAGS="-DWITH_LAPACK -msse3" LDFLAGS="-Wl,-framework -Wl,Accelerate" python install


To run the unit tests, install pytest and then execute:

py.test -v

All of the tests should (of course) pass. If any of the tests don’t pass and if you can’t sort out why, open an issue on GitHub.