Skip to content
Sébastien Maret edited this page Mar 22, 2023 · 29 revisions

Welcome to the Astrochem wiki!

This wiki contains information that may be useful to Astrochem users and developers. For a full documentation, see ReadTheDoc instead.

Installation tips

The INSTALL.md file in Astrochem distribution contains generic installation instructions. Here we give some platform-specific installation tips.

macOS

Using Homebrew

Astrochem dependencies can be installed with Homebrew as follows:

brew install autoconf automake gcc@9 hdf5 libtool python3 sundials

Once Python has been installed with Homebrew, all the required Python modules can be installed with pip:

pip3 install numpy matplotlib h5py cython

During Astrochem configuration, make sure to select the Homebrew versions of GCC and Python

./bootstrap &&
./configure CC=/usr/local/bin/gcc-9 PYTHON=/usr/local/bin/python3 CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" &&
make

Using Conda

Alternatively, it is possible to install Astrochem dependencies with Conda. One can create a virtual environment containing all dependencies with:

conda create --name astrochem -c conda-forge sundials=5.7.0 python cython numpy matplotlib h5py autoconf automake libtool

This environment can be activated with:

conda activate astrochem

To compile Astrochem, use the following cammands:

./bootstrap &&
./configure CPPFLAGS="-I$CONDA_PREFIX/include" LDFLAGS="-Wl,-rpath,$CONDA_PREFIX/lib -L/$CONDA_PREFIX/lib"  --prefix=$CONDA_PREFIX &&
make

Astrochem can be installed in this virtual environment with:

make install

Nix

Finally, it is possible to install all Astrochem dependencies (including Python) using nix. In Astrochem source directory, run:

nix-shell
./bootstrap
./configure
make

Linux/Ubuntu

Using Apt

On Ubuntu (or Debian) Linux, the dependencies can be installed with apt. Unfortunately, the version of SUNDIALS that is currently available in these distributions is too old and it is incompatible with Astrochem.

Using Conda

See the instructions for Conda on macOS.

Using Nix

See the instruction for Nix on macOS.