Skip to content

Installation

Create and activate a Python environment:

Terminal window
python -m venv env
source env/bin/activate
pip install --upgrade pip

Install the package and its requirements with pip:

Terminal window
pip install -e .

Run the code with:

Terminal window
patchwork
ExtraInstalls
testpytest and coverage
docsthe notebook runner and griffe for the API reference
devformatters and linters, plus the test and docs extras
Terminal window
pip install -e ".[dev]"

Install Matplotlib with Patchwork when you want to use plot_patches or run the examples that save figures. SciPy, used by the composite Poisson solver, is installed as a core dependency:

Terminal window
pip install -e ".[plot]"

For multi-rank runs, install the optional MPI bindings too:

Terminal window
pip install -e ".[mpi,plot]"

mpiarray uses its serial communicator when MPI is not installed or no MPI launcher is active. The AMR examples therefore run as ordinary Python scripts.