Mac
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.
Download the Pylians3 code from the repository
In a new conda environment (
conda create --name Pylians_env python=3.x.x
), install the above dependency packages in this new environment.conda activate Pylians_env
Using homebrew, install llvm and libomp by running:
brew install llvm
brew install libomp
navigate to the Pylians3/library directory. In there, open setup.py in a text editor. Delete every instance of ‘-fopenmp’
in a terminal, while in Pylians3/library, type
python setup.py install
to test the installation, navigate to Pylians3 directory, and run
`python Tests/import_libraries.py`
These instructions have been tested on High Sierra.
Many thanks to Alexander Gough for this!
Note
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 setup.py install
Thanks for Valerio Marra for this!