3

I've installed pygrib by using conda install -c conda-forge pygrib and no issues were raised. However, when importing it in order to use it I get this message: ImportError: dlopen(/Users/andrea1994/anaconda3/lib/python3.6/site-packages/pygrib.cpython-36m-darwin.so, 2): Library not loaded: @rpath/libpng16.16.dylib Referenced from: /Users/andrea1994/anaconda3/lib/python3.6/site-packages/pygrib.cpython-36m-darwin.so Reason: Incompatible library version: pygrib.cpython-36m-darwin.so requires version 51.0.0 or later, but libpng16.16.dylib provides version 49.0.0

I've gone through several procedures that were thought to solve similar issues but none worked (updating libpng, uninstalling and installing back Anaconda,...). Does anyone have any clue? I'm not an expert in this field: most of the times I manage to get things working, but as you see sometimes I fail. Thank you!

Andrea
  • 31
  • 4

2 Answers2

0

I know this is old, but I had the same issue and finally was able to import pygrib after I started a clean environment, installed from conda conda install -c conda-forge pygrib and then installed jasper, even though I believe it is installed with the pygrib install I am not sure if the correct one is installed or what. conda install jasper -c conda-forge

Jeff Tilton
  • 1,256
  • 1
  • 14
  • 28
  • Eventually I went for netCDF4 file format when getting data from ECMWF but thank you anyway for your advice! – Andrea Apr 10 '18 at 08:16
-1

sudo python -m pip install pygrib

Rahul Bhat
  • 65
  • 7