openclimatefix / Satip

Satip contains the code necessary for retrieving, transforming and storing EUMETSAT data
https://satip.readthedocs.io/
MIT License
41 stars 29 forks source link

Prescribed conda development environment missing shared object files #239

Open jsbaasi opened 8 months ago

jsbaasi commented 8 months ago

Describe the bug

The satip conda environment.yml file grabs transitive packages that are incorrect versions for pyproj I'm guessing. Below is the last call satip does before an import error occurs.

File "/home/user/anaconda3/envs/satip/lib/python3.12/site-packages/pyproj/network.py", line 10, in from pyproj._network import ( # noqa: F401 pylint: disable=unused-import

ImportError: xxxxxxxxx: cannot open shared object file: No such file or directory

It occurs for 2 transitive packages laid out below

1) libtiff - libtiff version 4.6.0 gets installed in the satip environment, which provides libtiff.so.6. Pyproj requires libtiff.so.5 which comes with 4.5.x instead.

2) libjpeg-turbo version 3.0.0 gets installed in the satip environment, which provides libjpeg.so and libjpeg.so.8 and libjpeg.so.8.3.2. Pyproj requires (actually libtiff requires this) libjpeg.so.9 which comes with not completely sure.

To Reproduce

Setup the satip conda environment and try to download eumetsat data with satip. Will import error.

Expected behavior

No import error occuring

This can be seen in the base conda environment as libtiff.so.5 and libjpeg.so.9 are both present

jsbaasi commented 8 months ago

I fixed this on my machine by just copying the required shared object files from my base conda environment. For fixing the bug with the satip environment, maybe there should be better dependency constraints? or a direct dependency to libjpeg and libtiff?

jacobbieker commented 8 months ago

Ah, thanks for finding this! Yeah, I guess better dependency constraints is probably my preferred way to go.