Deploying in google app engine with xarray[complete]

hi,
I made an app in Dash that uses zarr stores made by xarray to deploy in the google cloud app engine. However, because eccodes need the library libeccode-dev and I am only allowed pip, I am stuck.
Is there another way to add this library so that pip can build eccodes and xarray can work as it should?
Thanks

1 Like

Why do you need eccodes? That is not a required dependency for Xarray. Do you need to read GRIB data?

No I don’t these are zarr stores but when I try to open them the app crashes

/layers/google.python.pip/pip/lib/python3.8/site-packages/xarray/backends/plugins.py:68:
RuntimeWarning: Engine ‘cfgrib’ loading failed:
2022-01-27 17:21:32 default[20220127t171614] Cannot find the ecCodes library
2022-01-27 17:21:32 default[20220127t171614] warnings.warn(f"Engine {name!r} loading failed:\n{ex}", RuntimeWarning)
2022-01-27 17:21:34 default[20220127t171614] Traceback (most recent call last):

It actually comes from installing xarray[complete] in the requirements.txt
installing zarr before xarray with no decorator, the error message disappeared

1 Like

Yes, pip install xarray[complete] will bring along all the possible optional dependencies for xarray. If you are trying to create a more minimal environment, just use pip install xarray plus whatever io libraries you need (e.g. netcdf, Zarr, etc.)

For references, this is configured here:

1 Like