jswhit / pygrib

Python interface for reading and writing GRIB data
https://jswhit.github.io/pygrib
MIT License
327 stars 97 forks source link

Compatibility Issue - pygrib/pyhdf/netCDF4 #55

Open xebadir opened 7 years ago

xebadir commented 7 years ago

Running into an issue here that I can't imagine is that uncommon given the large number of users in the meteorological community. I work with datasets between each of the .nc, .grib and .hdf4 formats and it seems an oversight that there is non-conformity between this dependency for the three - this wasn't an issue in pygrib 1.9.9 as far as I'm aware (used to have all 3 playing nice):

In [1]: import pygrib

ImportError Traceback (most recent call last)

in () ----> 1 import pygrib ImportError: libjpeg.so.9: cannot open shared object file: No such file or directory Now - following a standard conda-forge install for pygrib you end up with jpeg9b which provides the above dependency issue. If you do this however, you get the same error for netCDF4 and pyhdf except for libjpeg.so.8. Not sure if there is a good resolution for this as I haven't been able to find out, but would prefer to be able to work between the formats as much as possible without relying on the dependency mess that is PyNIO.
jswhit commented 7 years ago

Seems like a problem with the dependency tracking in the conda packages, not the python modules themselves.

ocefpaf commented 7 years ago

Seems like a problem with the dependency tracking in the conda packages, not the python modules themselves.

Indeed.

Now - following a standard conda-forge install for pygrib you end up with jpeg9b which provides the above dependency issue. If you do this however, you get the same error for netCDF4 and pyhdf except for libjpeg.so.8. Not sure if there is a good resolution for this as I haven't been able to find out, but would prefer to be able to work between the formats as much as possible without relying on the dependency mess that is PyNIO.

conda-forge uses jpeg 9* while defaults uses jpeg 8*. To avoid conflicts we recommend you to read the docs (still un-merged) and follow the best practices there.

PS: please open issues like that in conda-forge feedstocks for the package in question.