Skip to content

Instantly share code, notes, and snippets.

@wxguy
Created August 5, 2017 17:49
Show Gist options
  • Save wxguy/e862e63ec70fb2ac6075d510cef7a48d to your computer and use it in GitHub Desktop.
Save wxguy/e862e63ec70fb2ac6075d510cef7a48d to your computer and use it in GitHub Desktop.
Installing pygrib on Cent OS 7/ Redhat 7
Cent OS does not ship with pygrib module by default. The only way to install is to run from source or using distributions such as
conda. I succeed installing pygrib using pip and here is the documentation for future reference.
# Install all required libraries.
sudo yum install grib_api-* *jasper* libpng *zlib* *gfortran* libpng-* python-pip pyproj jpeg python-grib_api
# Install pygrin using pip
sudo pip install pygrib
Please remember that if you get some xxxxxx.h is missing error, then you have install xxxxxx-devel package.
@karlwx
Copy link

karlwx commented Nov 20, 2018

This got me closer to a successful install, but mine still fails with:

/usr/bin/ld: cannot find -leccodes
collect2: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1

@thehomer87
Copy link

This got me closer to a successful install, but mine still fails with:

/usr/bin/ld: cannot find -leccodes
collect2: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1

I am getting the same fail, have you managed to resolve it?

@wxguy
Copy link
Author

wxguy commented Aug 9, 2019

/usr/bin/ld: cannot find -leccodes

It appears that eccodes is missing from your install. I don't have Cent OS any more, but it appears that you have to install eccodes0 or eccodes package installed before you try pip.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment