Installation

Installation#

Installation of mesher is possible via pip, conda, or spack. A spack build will be the easiest due to all the potentially complex dependencies of vtk and gal being handled automatically. See below on how to install with pip which requires system library installs. conda builds are particularly tested and YMMV.

Wheels are not prebuilt for mesher. Instead, mesher will need to be compiled as part of the install step. This thus requires a functional build environment.

Install spack#

Install spack

Use the git repository and use the develop branch, as significant bug fixes to packages mesher uses have been made in this branch.

Configure Spack#

It is critical to ensure spack is correctly configured, as described in the Spack Getting Started guide.

If you need to build a compiler via spack to use and the spack libraries, this is the time to do it. Otherwise, ensure the external compiler is found by spack and correctly configured.

If you use a system MPI or intel-oneapi-(mkl|tbb) (i.e., a not-spack built version), this is when it should be configured as a spack external package.

spack repo add https://github.com/Chrismarsh/spack-repo.git
spack install py-mesher

conda#

# ensure conda-forge is added
conda config --add channels conda-forge
conda config --set channel_priority strict

conda install mesher

pip#

Using pip, mesher must be built against system libraries.

Note

Depending on your python install, pip may be pip3

Ensure the following are installed via package manager:

For macos:

brew install gdal
brew install boost
brew install cgal
brew install metis

For Ubuntu:

sudo apt-get install libgdal-dev
sudo apt-get install libcgal-dev
sudo apt-get install gdal-bin
sudo apt-get install libcgal-dev
sudo apt-get install libboost-filesystem-dev
sudo apt-get install libboost-program-options-dev
sudo apt-get install libmetis-dev

# on Ubuntu 20.04+
sudo apt-get install python3-gdal
# prior to Ubuntu 20.04, use this instead of python3-gdal
# sudo apt-get install python-gdal

Then install mesher with

pip install mesher