From Monday 9th September 2024, ecCodes' Python bindings installed from PyPi additionally provide the ecCodes binary library, and will follow the version numbering of the ecCodes binary library. Thus, the latest version of the Python bindings is now 2.37.0 to match the latest release of the binaries. This improvement should aid installations in environments (such as various Jupyter services) where conda is not available.
ecCodes' Python bindings are installed from PyPi with this command:
pip install eccodes
This installation will, by default, include the ecCodes binary library (as of version 2.37.0), meaning that no external ecCodes binary library is required. If you have an external ecCodes binary library that you wish to use, set the following environment variable before you import eccodes:
export ECCODES_PYTHON_USE_FINDLIBS=1
If this is set, the ecCodes' Python bindings will use the findlibs package to locate the binary library (findlibs was the only mechanism used before version 2.37.0, so this effectively gives the behaviour that existed before version 2.37.0).
In order to gain insights into the search for the binary library, set the following environment variable before importing eccodes:
export ECCODES_PYTHON_TRACE_LIB_SEARCH=1
You may also install a version of ecCodes' Python interface that does not include a binary library at all, in which case the findlibs mechanism will be used as before:
pip install eccodes --no-binary eccodes
This information is also documented in the README file in the eccodes-python repository.
Note that this change does not affect conda installations of ecCodes.