ecmwf / eccodes-python

Python interface to the ecCodes GRIB/BUFR decoder/encoder
Apache License 2.0
115 stars 33 forks source link

ImportError: libeccodes.so: cannot open shared object file: No such file or directory #38

Closed mraspaud closed 4 years ago

mraspaud commented 4 years ago

Using conda with the conda forge channel to install python-eccodes on linux (RHEL and ubuntu), we noticed today that the importing eccodes crashes with an import error.

Minimal example:

conda install python-eccodes

That downloads and install

    package                    |            build
    ---------------------------|-----------------
    eccodes-2.19.0             |       hf05d9b7_1         4.0 MB  conda-forge
    python-eccodes-2020.06.0   |   py38hab2c0dc_1          94 KB  conda-forge
    ------------------------------------------------------------
                                           Total:         4.1 MB

And then:

❯ python
Python 3.8.6 | packaged by conda-forge | (default, Oct  7 2020, 19:08:05) 
[GCC 7.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import eccodes
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/a001673/miniconda3/envs/satpy-dev/lib/python3.8/site-packages/eccodes/__init__.py", line 15, in <module>
    from .eccodes import *
  File "/home/a001673/miniconda3/envs/satpy-dev/lib/python3.8/site-packages/eccodes/eccodes.py", line 12, in <module>
    from gribapi import __version__
  File "/home/a001673/miniconda3/envs/satpy-dev/lib/python3.8/site-packages/gribapi/__init__.py", line 13, in <module>
    from .gribapi import *  # noqa
  File "/home/a001673/miniconda3/envs/satpy-dev/lib/python3.8/site-packages/gribapi/gribapi.py", line 32, in <module>
    from .bindings import ENC, ffi, lib
  File "/home/a001673/miniconda3/envs/satpy-dev/lib/python3.8/site-packages/gribapi/bindings.py", line 29, in <module>
    from ._bindings import ffi, lib
ImportError: libeccodes.so: cannot open shared object file: No such file or directory
>>> 

We see here in github that there is a 2020.10 release, could it be that it didn't make it to conda-forge for some reason?

mraspaud commented 4 years ago

Note: rolling back to eccodes 2.18.0 fixes the problem.

mraspaud commented 4 years ago

Fixed when 2020.10 was uploaded on conda-forge