Hard Requirments

  • NumPy
  • pybind11 (and therefore a C++11 compiler; if using pip, must be explicitly installed before pygram11).

Soft Requirements

  • OpenMP (will be used if installed from conda-forge).

You can use pygram11 without OpenMP, but you might want to try fast-histogram if you just need to compute fixed bin histograms with OpenMP (see the benchmarks). If you’re here for variable width histograms or the sum-of-weights-squared first class citizenry - I think you’ll still find pygram11 useful.

Install Options


Installations from conda-forge provide a build that used OpenMP.

$ conda install -c conda-forge pygram11


pybind11 must be installed explicitly before pygram11.

$ pip install pybind11 numpy
$ pip install pygram11


If installing from PyPI in an Anaconda environment on macOS 10.14 with Xcode 10.2 command line tools (Apple LLVM version 10.0.1), you must specify the deployment target:

$ MACOSX_DEPLOYMENT_TARGET=10.14.4 pip install pygram11


pybind11 must be installed explicitly before pygram11.

$ git clone
$ pip install pybind11 numpy
$ cd pygram11
$ pip install .

In macOS Anaconda environments see the above note related to PyPI installations.