Pylians3 make use of these packages:

  • numpy

  • scipy

  • h5py

  • pyfftw

  • mpi4py

  • cython

  • openmp

We recommend installing all packages, with the exception of openmp, with anaconda.

  1. Download the Pylians3 code from the repository

  2. In a new conda environment (conda create --name Pylians_env python=3.x.x), install the above dependency packages in this new environment.

  3. conda activate Pylians_env

  4. Using homebrew, install llvm and libomp by running:

brew install llvm
brew install libomp
  1. navigate to the Pylians3/library directory. In there, open in a text editor. Delete every instance of ‘-fopenmp’

  2. in a terminal, while in Pylians3/library, type python install

  3. to test the installation, navigate to Pylians3 directory, and run `python Tests/`

These instructions have been tested on High Sierra.

Many thanks to Alexander Gough for this!


For M1 mac users the instructions are similar but:

  • verify that clang version is >=13

  • replace “-march=native” by “mcpu=apple-m1”

  • use CC=clang python install

Thanks for Valerio Marra for this!