The easiest way to get everything installed is to use pip:

>>> pip install pygrib

This will install all the dependencies for you (including the ECCODES C lib).

If you’re using Anaconda python, use conda:

>>> conda install -c conda-forge pygrib


To build from source, clone the github repository and run

>>> git clone
>>> cd pygrib
>>> ECCODES_DIR=path/to/eccodes python install

where $ECCODES_DIR is the path to the directory containing include/grib_api.h and lib/ If ECCODES_DIR is not specified, a few common locations such as $CONDA_PREFIX,/usr,/usr/local,/opt/local will be searched.. Then run a test script to check if things are working cd test; python