Choose one of the install methods below to get started:


Using the Spack Package

A package for openPMD-api is available on the Spack package manager.

# optional:               +python +adios1 -mpi
spack install openpmd-api
spack load -r openpmd-api

Using the Conda Package

A package for openPMD-api is available on the Conda package manager.

# optional:            OpenMPI support  =*=mpi_openmpi*
# optional:              MPICH support  =*=mpi_mpich*
conda install -c conda-forge openpmd-api

Using the PyPI Package

A package for openPMD-api is available on the Python Package Index (PyPI).

Behind the scenes, this install method compiles from source against the found installations of HDF5, ADIOS and/or MPI (in system paths, from other package managers, or loaded via a module system, …). The current status for this install method is experimental. Please feel free to report how this works for you.

# optional:             --user
pip install openpmd-api

or with MPI support:

# optional:                                                  --user
openPMD_USE_MPI=ON pip install openpmd-api --no-binary :all:

From Source with CMake

You can also install openPMD-api from source with CMake. This requires that you have all dependencies installed on your system. The developer section on build options provides further details on variants of the build.

Linux & OSX

git clone

mkdir openPMD-api-build
cd openPMD-api-build

# optional: for full tests

# for own install prefix append:
# for options append:
#   -DopenPMD_USE_...=...
# e.g. for python support add:
cmake ../openPMD-api

cmake --build .

# optional

# sudo might be required for system paths
cmake --build . --target install


The process is basically similar to Linux & OSX, with just a couple of minor tweaks. Use ps ..\openPMD-api\.travis\download_samples.ps1 to download sample files for tests (optional). Replace the last three commands with

cmake --build . --config Release

# optional
ctest -C Release

# administrative privileges might be required for system paths
cmake --build . --config Release --target install

Post “From Source” Install

If you installed to a non-system path on Linux or OSX, you need to express where your newly installed library can be found.

Adjust the lines below accordingly, e.g. replace $HOME/somepath with your install location prefix in -DCMAKE_INSTALL_PREFIX=.... CMake will summarize the install paths for you before the build step.

# install prefix         |------------|

#                change path to your python MAJOR.MINOR version
export PYTHONPATH=$HOME/somepath/lib/python3.5/site-packages:$PYTHONPATH

Adding those lines to your $HOME/.bashrc and re-opening your terminal will set them permanently.

Set hints on Windows with the CMake printed paths accordingly, e.g.:

set PATH=C:\\Program Files\openPMD\Lib;%PATH%
set PYTHONPATH=C:\\Program Files\openPMD\Lib\site-packages;%PYTHONPATH%