Installation¶
Instructions¶
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
Developing¶
To build from source, clone the github repository and run setup.py:
>>> git clone https://github.com/jswhit/pygrib
>>> cd pygrib
>>> ECCODES_DIR=path/to/eccodes python setup.py install
where $ECCODES_DIR
is the path to the directory containing include/grib_api.h
and lib/libeccodes.so
. 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 test.py