Installation#

Requirements#

Build Dependencies#

Runtime Dependencies#

Dependency

Link

metkit

ecmwf/metkit

eckit

ecmwf/eckit

eccodes

ecmwf/eccodes

eccodes is optional. The CLI reports it as [Optional] and a missing eccodes does not cause a non-zero exit.

Python Dependencies#

pymetkit requires Python >= 3.11. The runtime dependencies are pinned in python/requirements.txt:

uv pip install -r python/requirements.txt

python/requirements-build.txt additionally covers everything needed to build the documentation and run the doctests.

Installation via PyPI#

uv venv
source .venv/bin/activate
uv pip install pymetkit

Set the METKIT_HOME environment variable so findlibs can locate the library:

export METKIT_HOME=<path_to_metkit_home>

Diagnosing Library Resolution#

PyMetKit uses findlibs to locate the metkit shared library and its runtime dependencies at import time. If you encounter errors caused by the wrong library version being loaded, the built-in CLI can help you inspect what findlibs resolves on your system.

Print the installation root of the metkit library:

python -m pymetkit --print-home

Print the resolved home directories for all runtime dependencies (eckit, eccodes, metkit), together with any active FINDLIBS_DISABLE_* environment variables that suppress specific search paths:

python -m pymetkit --print-home-deps

Add -v / --verbose to either command to raise the log level from INFO to DEBUG.

ERROR lines indicate dependencies findlibs could not locate — set the corresponding <LIBNAME>_HOME environment variable to resolve them explicitly.

The exit code tells you whether the resolution succeeded:

Exit code

Meaning

0

All required dependencies resolved. A missing optional dependency (eccodes) still exits 0.

1

A required dependency could not be located.

2

No flag given; the help text is printed instead.