Python: RuntimeError: ecCodes library not found using ['eccodes', 'libeccodes.so', 'libeccodes'] after installing cfgrib

Viewed 2647

I have installed cfgrib on my macOs by doing the following

python3.8 -m pip install cfgrib

Now if I open try to import cfgrib

import cfgrib

I get

RuntimeError: ecCodes library not found using ['eccodes', 'libeccodes.so', 'libeccodes']

I solved it by installing cfgrib via homebrew.

brew install eccodes
1 Answers

The package cfgrib depends on the eccodes python package to access the ECMWF ecCodes binary library. So install:

pip install eccodes

After that you can try:

python -m cfgrib selfcheck

You should get an output like this:

Found: ecCodes v2.20.0.
Your system is ready.

Hopefully this will solve your problem.

If not, maybe you have to install the packages that are listen in your error message.

Related