Open Saszalez opened 5 years ago
Look at the error. “grib_api.h: No existe el fichero o el directorio
You need to install libeccodes. grib_api is deprecated.
I installed libeccodes, but the installation of pygrib is still looking for the file grib_api.h
libeecodes includes grib_api.h. You need to specify the path in setup.cfg
On Tue, Jun 25, 2019 at 8:23 AM Saszalez notifications@github.com wrote:
I installed libeccodes, but the installation of pygrib is still looking for the file grib_api.h
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jswhit/pygrib/issues/115?email_source=notifications&email_token=AAENQCLYY3VW65KV4GFROITP4IS5XA5CNFSM4H3IJQKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYQNKHQ#issuecomment-505468190, or mute the thread https://github.com/notifications/unsubscribe-auth/AAENQCPLIQKNIED6LUSKF3DP4IS5XANCNFSM4H3IJQKA .
-- Jeffrey S. Whitaker NOAA/OAR/PSD R/PSD1 325 Broadway, Boulder, CO, 80305-3328 Phone: (303)497-6313 FAX: (303)497-6449
Correct, the file grib_api.h is installed. The problem is that I do not have any setup.cfg file. The grib_api.h file is in the include path, how and where can I indicate that path?
Sorry to comment again. In the end, I set the environment variables:
export LDFLAGS='-L/my/libeccodes/path/lib'
export CFLAGS='-I/my/libeccodes/path/lib'
Pygrib was installed correctly.
@Saszalez Thanks for sharing the solution of setting environment variables. Do you mind sharing what was the actual path to libeccodes/lib on your machine? I have it installed but cannot find the path to lib/
@coolashish A bit late, but i found that simply running pip3 install eccodes-python
did the trick. No need to do any exports that way (Reference)
Edit: I was re-trying this on a clean install, its turns out that in addition to the above, the libeccodes-dev package needs to be installed locally. Which can by done by running sudo apt install libeccodes-dev
So, if you'd need to install this pygrib entirely from repositories you'd need to run the following:
sudo apt install libeccodes-dev
pip3 install numpy
pip3 install pyproj
pip3 install eccodes-python
pip3 install pygrib
This was tested on Ubuntu 18.04/Python3, clean install
For anyone else who ends up here from Google, using CentOS, Conda, and Python 3.7.9, you can install directly from conda using:
conda install -c conda-forge pygrib
For anyone else who ends up here from Google, using CentOS, Conda, and Python 3.7.9, you can install directly from conda using:
conda install -c conda-forge pygrib
I recently updated my Anaconda3 on Win10 and this conda-forge technique fails with many "conflicts"
Anaconda 2020.07 for example:
Package spyder-kernels conflicts for:
spyder -> spyder-kernels[version='0.*|>=0.1,<1|>=0.4.2,<1|>=0.4.3,<1|>=0.5.0,<1|>=1.10.0,<1.11.0|>=1.9.4,<1.10.0|>=1.9.2,<1.10.0|>=1.9.1,<1.10.0|>=1.9.0,<1.10.0|>=1.8.1,<1.9.0|>=1.8.1,<2.0.0|<1.0']
anaconda==2020.07 -> spyder-kernels==1.9.2[build='py38_0|py36_0|py37_0']
anaconda==2020.07 -> spyder==4.1.4=py36_0 -> spyder-kernels[version='>=1.9.2,<1.10.0']
@MarkUoLeeds I ran into the same problems as you describe (on Mac OS Catalina), and fixed it by running
conda install anaconda
conda update --all
before the conda install. Hope that helps!
I'm trying to install Pygrib with pip (pip install pygrib):
The versions are:
How can I fix this error?