Coder Social home page Coder Social logo

pygrib-feedstock's Introduction

About pygrib-feedstock

Feedstock license: BSD-3-Clause

Home: https://github.com/jswhit/pygrib

Package license: MIT

Summary: Python GRIB (editions 1 and 2) reader

Development: https://github.com/jswhit/pygrib

Documentation: https://jswhit.github.io/pygrib/

Current build status

Azure
VariantStatus
linux_64_numpy1.22python3.10.____cpython variant
linux_64_numpy1.22python3.8.____cpython variant
linux_64_numpy1.22python3.9.____73_pypy variant
linux_64_numpy1.22python3.9.____cpython variant
linux_64_numpy1.23python3.11.____cpython variant
linux_64_numpy1.26python3.12.____cpython variant
linux_aarch64_numpy1.22python3.10.____cpython variant
linux_aarch64_numpy1.22python3.8.____cpython variant
linux_aarch64_numpy1.22python3.9.____73_pypy variant
linux_aarch64_numpy1.22python3.9.____cpython variant
linux_aarch64_numpy1.23python3.11.____cpython variant
linux_aarch64_numpy1.26python3.12.____cpython variant
linux_ppc64le_numpy1.22python3.10.____cpython variant
linux_ppc64le_numpy1.22python3.8.____cpython variant
linux_ppc64le_numpy1.22python3.9.____73_pypy variant
linux_ppc64le_numpy1.22python3.9.____cpython variant
linux_ppc64le_numpy1.23python3.11.____cpython variant
linux_ppc64le_numpy1.26python3.12.____cpython variant
osx_64_numpy1.22python3.10.____cpython variant
osx_64_numpy1.22python3.8.____cpython variant
osx_64_numpy1.22python3.9.____73_pypy variant
osx_64_numpy1.22python3.9.____cpython variant
osx_64_numpy1.23python3.11.____cpython variant
osx_64_numpy1.26python3.12.____cpython variant
osx_arm64_numpy1.22python3.10.____cpython variant
osx_arm64_numpy1.22python3.8.____cpython variant
osx_arm64_numpy1.22python3.9.____cpython variant
osx_arm64_numpy1.23python3.11.____cpython variant
osx_arm64_numpy1.26python3.12.____cpython variant
win_64_numpy1.22python3.10.____cpython variant
win_64_numpy1.22python3.8.____cpython variant
win_64_numpy1.22python3.9.____73_pypy variant
win_64_numpy1.22python3.9.____cpython variant
win_64_numpy1.23python3.11.____cpython variant
win_64_numpy1.26python3.12.____cpython variant

Current release info

Name Downloads Version Platforms
Conda Recipe Conda Downloads Conda Version Conda Platforms

Installing pygrib

Installing pygrib from the conda-forge channel can be achieved by adding conda-forge to your channels with:

conda config --add channels conda-forge
conda config --set channel_priority strict

Once the conda-forge channel has been enabled, pygrib can be installed with conda:

conda install pygrib

or with mamba:

mamba install pygrib

It is possible to list all of the versions of pygrib available on your platform with conda:

conda search pygrib --channel conda-forge

or with mamba:

mamba search pygrib --channel conda-forge

Alternatively, mamba repoquery may provide more information:

# Search all versions available on your platform:
mamba repoquery search pygrib --channel conda-forge

# List packages depending on `pygrib`:
mamba repoquery whoneeds pygrib --channel conda-forge

# List dependencies of `pygrib`:
mamba repoquery depends pygrib --channel conda-forge

About conda-forge

Powered by NumFOCUS

conda-forge is a community-led conda channel of installable packages. In order to provide high-quality builds, the process has been automated into the conda-forge GitHub organization. The conda-forge organization contains one repository for each of the installable packages. Such a repository is known as a feedstock.

A feedstock is made up of a conda recipe (the instructions on what and how to build the package) and the necessary configurations for automatic building using freely available continuous integration services. Thanks to the awesome service provided by Azure, GitHub, CircleCI, AppVeyor, Drone, and TravisCI it is possible to build and upload installable packages to the conda-forge anaconda.org channel for Linux, Windows and OSX respectively.

To manage the continuous integration and simplify feedstock maintenance conda-smithy has been developed. Using the conda-forge.yml within this repository, it is possible to re-render all of this feedstock's supporting files (e.g. the CI configuration files) with conda smithy rerender.

For more information please check the conda-forge documentation.

Terminology

feedstock - the conda recipe (raw material), supporting scripts and CI configuration.

conda-smithy - the tool which helps orchestrate the feedstock. Its primary use is in the construction of the CI .yml files and simplify the management of many feedstocks.

conda-forge - the place where the feedstock and smithy live and work to produce the finished article (built conda distributions)

Updating pygrib-feedstock

If you would like to improve the pygrib recipe or build a new package version, please fork this repository and submit a PR. Upon submission, your changes will be run on the appropriate platforms to give the reviewer an opportunity to confirm that the changes result in a successful build. Once merged, the recipe will be re-built and uploaded automatically to the conda-forge channel, whereupon the built conda packages will be available for everybody to install and use from the conda-forge channel. Note that all branches in the conda-forge/pygrib-feedstock are immediately built and any created packages are uploaded, so PRs should be based on branches in forks and branches in the main repository should only be used to build distinct package versions.

In order to produce a uniquely identifiable distribution:

  • If the version of a package is not being increased, please add or increase the build/number.
  • If the version of a package is being increased, please remember to return the build/number back to 0.

Feedstock Maintainers

pygrib-feedstock's People

Contributors

akrherz avatar beckermr avatar conda-forge-admin avatar conda-forge-curator[bot] avatar dopplershift avatar github-actions[bot] avatar jjhelmus avatar ocefpaf avatar regro-cf-autotick-bot avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

pygrib-feedstock's Issues

pygrib fails to load due to missing libhdf5.so.10

I am using a currently up-to-date conda-forge (sans pandas 0.21.0) python2.7 on linux 64 bit and can not import pygrib

$ python
Python 2.7.14 | packaged by conda-forge | (default, Nov  4 2017, 10:15:28) 
[GCC 4.8.2 20140120 (Red Hat 4.8.2-15)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pygrib
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: libhdf5.so.10: cannot open shared object file: No such file or directory
$ conda inspect linkages pygrib
pygrib
------

curl-7.55.1-0:
    libcurl.so.4 (lib/libcurl.so.4)

ecmwf_grib-1.23.1-0:
    libgrib_api.so (lib/libgrib_api.so)

hdf4-4.2.13-0:
    libdf.so.0 (lib/libdf.so.0)
    libmfhdf.so.0 (lib/libmfhdf.so.0)

hdf5-1.10.1-1:
    libhdf5.so.101 (lib/libhdf5.so.101)
    libhdf5_hl.so.100 (lib/libhdf5_hl.so.100)

jasper-1.900.1-4:
    libjasper.so.1 (lib/libjasper.so.1)

jpeg-9b-2:
    libjpeg.so.9 (lib/libjpeg.so.9)

krb5-1.14.2-0:
    libcom_err.so.3 (lib/libcom_err.so.3)
    libgssapi_krb5.so.2 (lib/libgssapi_krb5.so.2)
    libk5crypto.so.3 (lib/libk5crypto.so.3)
    libkrb5.so.3 (lib/libkrb5.so.3)
    libkrb5support.so.0 (lib/libkrb5support.so.0)

libnetcdf-4.4.1.1-10:
    libnetcdf.so.11 (lib/libnetcdf.so.11)

libpng-1.6.28-2:
    libpng16.so.16 (lib/libpng16.so.16)

libssh2-1.8.0-2:
    libssh2.so.1 (lib/libssh2.so.1)

openssl-1.0.2l-0:
    libcrypto.so.1.0.0 (lib/libcrypto.so.1.0.0)
    libssl.so.1.0.0 (lib/libssl.so.1.0.0)

python-2.7.14-1:
    libpython2.7.so.1.0 (lib/libpython2.7.so.1.0)

zlib-1.2.11-0:
    libz.so.1 (lib/libz.so.1)

system:
    libc.so.6 (/lib64/libc.so.6)
    libdl.so.2 (/lib64/libdl.so.2)
    libm.so.6 (/lib64/libm.so.6)
    libpthread.so.0 (/lib64/libpthread.so.0)
    libresolv.so.2 (/lib64/libresolv.so.2)
    librt.so.1 (/lib64/librt.so.1)
    libutil.so.1 (/lib64/libutil.so.1)
    linux-vdso.so.1 ()

not found:
    libhdf5.so.10 (not found)
$ conda list pygrib
pygrib                    2.0.2                    py27_1    conda-forge
$ conda list hdf5
hdf5                      1.10.1                        1    conda-forge

I tried uninstalling it and reinstalling pygrib without success. This only started after the hdf5 update

Installing pygrib with conda-forge

Hello, I am trying to install pygrib using this repository, and have followed the instructions given.

When I try to import the pygrib module in a script, I receive the following error:

ImportError: dlopen(/Users/Alex/miniconda2/lib/python2.7/site-packages/pygrib.so, 2): Library not loaded: @rpath/libjpeg.9.dylib
  Referenced from: /Users/Alex/miniconda2/lib/libgrib_api.dylib
  Reason: image not found

Is there something I am missing? My installation of conda could sometimes be a bit weird as I accidentally installed it using sudo and now everything requires sudo.

pygrib 2.0.2 on OSX, PY 3.5: missing libjpeg.9.dylib

Import of pygrib fails (first block below); I also note that libjpeg does not appear in the dependency list (second block below).

(test) efiring@manini2:~/work/teaching/data_analysis/2017/Alex$ conda list pygrib
# packages in environment at /Users/efiring/anaconda/envs/test:
#
pygrib                    2.0.2                    py35_0    conda-forge
(test) efiring@manini2:~/work/teaching/data_analysis/2017/Alex$ ipython
Python 3.5.2 |Anaconda 4.2.0 (x86_64)| (default, Jul  2 2016, 17:52:12)
Type "copyright", "credits" or "license" for more information.

IPython 5.1.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: import pygrib
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-6160c29be9fd> in <module>()
----> 1 import pygrib

ImportError: dlopen(/Users/efiring/anaconda/envs/test/lib/python3.5/site-packages/pygrib.cpython-35m-darwin.so, 2): Library not loaded: @rpath/libjpeg.9.dylib
  Referenced from: /Users/efiring/anaconda/envs/test/lib/libgrib_api.dylib
  Reason: image not found

From "conda info pygrib":

pygrib 2.0.2 py35_0
-------------------
file name   : conda-forge::pygrib-2.0.2-py35_0.tar.bz2
name        : pygrib
version     : 2.0.2
build number: 0
build string: py35_0
channel     : conda-forge
size        : 794 KB
arch        : x86_64
binstar     : {'package_id': '571135515351d85fceeb3a57', 'owner_id': '5528f42ce1dad12974506e8d', 'channel': 'main'}
fn          : pygrib-2.0.2-py35_0.tar.bz2
has_prefix  : True
license     : MIT
license_family: MIT
machine     : x86_64
md5         : 3b65d79bd59441ade840f0f82e161ddb
operatingsystem: darwin
platform    : osx
priority    : 0
schannel    : conda-forge
subdir      : osx-64
target-triplet: x86_64-any-darwin
url         : https://conda.anaconda.org/conda-forge/osx-64/pygrib-2.0.2-py35_0.tar.bz2
dependencies:
    ecmwf_grib
    jasper
    libpng >=1.6.23,<1.7
    numpy
    pyproj
    python 3.5*

Does not specify jpeg dependency. Breaks if older jpeg version is already installed.

conda create -n test-pygrib python=3.5 jpeg
Fetching package metadata .......
Solving package specifications: ..........
Using Anaconda Cloud api site https://api.anaconda.org

Package plan for installation in environment /home/cpa/.pyenv/versions/miniconda-3.16.0/envs/test-pygrib:

The following NEW packages will be INSTALLED:

    jpeg:       8d-1          defaults
    openssl:    1.0.2h-1      defaults
    pip:        8.1.2-py35_0  defaults
    python:     3.5.2-0       defaults
    readline:   6.2-2         defaults
    setuptools: 25.1.6-py35_0 defaults
    sqlite:     3.13.0-0      defaults
    tk:         8.5.18-0      defaults
    wheel:      0.29.0-py35_0 defaults
    xz:         5.2.2-0       defaults
    zlib:       1.2.8-3       defaults

Proceed ([y]/n)? y

Linking packages ...
[      COMPLETE      ]|###################################################################################################################################| 100%
#
# To activate this environment, use:
# $ source activate test-pygrib
#
# To deactivate this environment, use:
# $ source deactivate
#

/IPF/cpa/R/Datapool_processed/WARP/ancillary/warp5_grid
(miniconda-3.16.0) ❯ source activate test-pygrib
pyenv-virtualenv: activate miniconda-3.16.0/envs/test-pygrib
pyenv-virtualenv: prompt changing will be removed from future release. configure `export PYENV_VIRTUALENV_DISABLE_PROMPT=1' to simulate the behavior.

/IPF/cpa/R/Datapool_processed/WARP/ancillary/warp5_grid
(miniconda-3.16.0/envs/test-pygrib) ❯ conda install -c conda-forge pygrib
Using Anaconda Cloud api site https://api.anaconda.org
Fetching package metadata .........
Solving package specifications: ..........

Package plan for installation in environment /home/cpa/.pyenv/versions/miniconda-3.16.0/envs/test-pygrib:

The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    hdf4-4.2.12                |                0         677 KB  defaults

The following NEW packages will be INSTALLED:

    curl:        7.49.1-1       conda-forge
    ecmwf_grib:  1.16.0-0       conda-forge
    hdf4:        4.2.12-0       defaults   
    hdf5:        1.8.17-2       conda-forge
    jasper:      1.900.1-1      conda-forge
    libgfortran: 3.0.0-1        defaults   
    libnetcdf:   4.4.1-0        conda-forge
    libpng:      1.6.24-0       conda-forge
    mkl:         11.3.3-0       defaults   
    numpy:       1.11.1-py35_0  defaults   
    pygrib:      2.0.1-py35_3   conda-forge
    pyproj:      1.9.5.1-py35_0 conda-forge

Proceed ([y]/n)? y

Pruning fetched packages from the cache ...
Fetching packages ...
hdf4-4.2.12-0. 100% |################################################################################################################| Time: 0:00:29  23.28 kB/s
Extracting packages ...
[      COMPLETE      ]|###################################################################################################################################| 100%
Linking packages ...
[      COMPLETE      ]|###################################################################################################################################| 100%

/IPF/cpa/R/Datapool_processed/WARP/ancillary/warp5_grid 49s
(miniconda-3.16.0/envs/test-pygrib) ❯ conda list
# packages in environment at /home/cpa/.pyenv/versions/miniconda-3.16.0/envs/test-pygrib:
#
Using Anaconda Cloud api site https://api.anaconda.org
curl                      7.49.1                        1    conda-forge
ecmwf_grib                1.16.0                        0    conda-forge
hdf5                      1.8.17                        2    conda-forge
jasper                    1.900.1                       1    conda-forge
libnetcdf                 4.4.1                         0    conda-forge
libpng                    1.6.24                        0    conda-forge
pygrib                    2.0.1                    py35_3    conda-forge
pyproj                    1.9.5.1                  py35_0    conda-forge
hdf4                      4.2.12                        0    defaults
jpeg                      8d                            1    defaults
libgfortran               3.0.0                         1    defaults
mkl                       11.3.3                        0    defaults
numpy                     1.11.1                   py35_0    defaults
openssl                   1.0.2h                        1    defaults
pip                       8.1.2                    py35_0    defaults
python                    3.5.2                         0    defaults
readline                  6.2                           2    defaults
setuptools                25.1.6                   py35_0    defaults
sqlite                    3.13.0                        0    defaults
tk                        8.5.18                        0    defaults
wheel                     0.29.0                   py35_0    defaults
xz                        5.2.2                         0    defaults
zlib                      1.2.8                         3    defaults

/IPF/cpa/R/Datapool_processed/WARP/ancillary/warp5_grid
(miniconda-3.16.0/envs/test-pygrib) ❯ python  
Python 3.5.2 |Continuum Analytics, Inc.| (default, Jul  2 2016, 17:53:06) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pygrib
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: libjpeg.so.9: cannot open shared object file: No such file or directory

Cannot import pygrib

I have tried using 'conda install' to install pygrib. When I got to import pygrib, I get 'ImportError: libgrib_api.so.1: cannot open shared object file: No such file or directory'. I can see the 'libgrid_api.so' in my /lib, but no libgrib_api.so.1. I am on a Linux machine using python2.7.

More tests with real data

The GitHub repo has a sample data directory and it would be nice to choose one or two data files to use here and test the package against the CLI shipped (cnvgrib1to2, cnvgrib2to1, grib_list, and grib_repack).

I played with the idea and I got a few failures. Since I don't know the first thing about pygrib I hope someone that knows what s/he is doing tackles this.

Missing jpeg

I installed pygrib:

$ conda install -c conda-forge pygrib

I tested import:

import pygrib
Traceback (most recent call last):
File "", line 1, in
ImportError: libjpeg.so.9: cannot open shared object file: No such file or directory

I installed jpeg:

$ conda install -c conda-forge jpeg

Now all is well. Please add jpeg to dependencies :)

Update compilers for macOS

Over in #54, we ran into an error compiling with >v14 of the compilers for Mac:

  creating build/temp.macosx-10.9-x86_64-cpython-310/src/pygrib
  x86_64-apple-darwin13.4.0-clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/runner/miniforge3/conda-bld/pygrib_1698064180141/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/include -fPIC -O2 -isystem /Users/runner/miniforge3/conda-bld/pygrib_1698064180141/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/include -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -isystem /Users/runner/miniforge3/conda-bld/pygrib_1698064180141/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/include -fdebug-prefix-map=/Users/runner/miniforge3/conda-bld/pygrib_1698064180141/work=/usr/local/src/conda/pygrib-2.1.4 -fdebug-prefix-map=/Users/runner/miniforge3/conda-bld/pygrib_1698064180141/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl=/usr/local/src/conda-prefix -D_FORTIFY_SOURCE=2 -isystem /Users/runner/miniforge3/conda-bld/pygrib_1698064180141/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/include -mmacosx-version-min=10.9 -I/Users/runner/miniforge3/conda-bld/pygrib_1698064180141/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/include -I/Users/runner/miniforge3/conda-bld/pygrib_1698064180141/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/include/python3.10 -I/Users/runner/miniforge3/conda-bld/pygrib_1698064180141/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.10/site-packages/numpy/core/include -c src/pygrib/_pygrib.c -o build/temp.macosx-10.9-x86_64-cpython-310/src/pygrib/_pygrib.o
  In file included from src/pygrib/_pygrib.c:1210:
  In file included from /Users/runner/miniforge3/conda-bld/pygrib_1698064180141/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.10/site-packages/numpy/core/include/numpy/arrayobject.h:5:
  In file included from /Users/runner/miniforge3/conda-bld/pygrib_1698064180141/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.10/site-packages/numpy/core/include/numpy/ndarrayobject.h:12:
  In file included from /Users/runner/miniforge3/conda-bld/pygrib_1698064180141/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.10/site-packages/numpy/core/include/numpy/ndarraytypes.h:1960:
  /Users/runner/miniforge3/conda-bld/pygrib_1698064180141/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.10/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: "Using deprecated NumPy API, disable it with "          "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
  #warning "Using deprecated NumPy API, disable it with " \
   ^
  src/pygrib/_pygrib.c:22040:18: warning: assigning to 'char *' from 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
      __pyx_v_name = grib_keys_iterator_get_name(__pyx_v_gi);
                   ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  src/pygrib/_pygrib.c:22507:18: warning: assigning to 'char *' from 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
      __pyx_v_name = grib_keys_iterator_get_name(__pyx_v_gi);
                   ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  src/pygrib/_pygrib.c:26586:53: warning: passing 'void **' to parameter of type 'const void **' discards qualifiers in nested pointer types [-Wincompatible-pointer-types-discards-qualifiers]
    __pyx_v_err = grib_get_message(__pyx_v_self->_gh, (&__pyx_v_message), (&__pyx_v_size));
                                                      ^~~~~~~~~~~~~~~~~~
  /Users/runner/miniforge3/conda-bld/pygrib_1698064180141/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/include/grib_api.h:572:57: note: passing argument to parameter 'message' here
  int grib_get_message(const grib_handle* h, const void** message, size_t* message_length);
                                                          ^
  src/pygrib/_pygrib.c:44829:3: error: incompatible pointer to integer conversion returning 'void *' from a function with result type 'int' [-Wint-conversion]
    import_array();
    ^~~~~~~~~~~~~~
  /Users/runner/miniforge3/conda-bld/pygrib_1698064180141/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.10/site-packages/numpy/core/include/numpy/__multiarray_api.h:1545:151: note: expanded from macro 'import_array'
  #define import_array() {if (_import_array() < 0) {PyErr_Print(); PyErr_SetString(PyExc_ImportError, "numpy.core.multiarray failed to import"); return NULL; } }
                                                                                                                                                        ^~~~
  /Users/runner/miniforge3/conda-bld/pygrib_1698064180141/_build_env/lib/clang/16/include/stddef.h:89:16: note: expanded from macro 'NULL'
  #  define NULL ((void*)0)
                 ^~~~~~~~~~
  4 warnings and 1 error generated.
  error: command '/Users/runner/miniforge3/conda-bld/pygrib_1698064180141/_build_env/bin/x86_64-apple-darwin13.4.0-clang' failed with exit code 1
  error: subprocess-exited-with-error
  
  × Building wheel for pygrib (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: /Users/runner/miniforge3/conda-bld/pygrib_1698064180141/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/bin/python /Users/runner/miniforge3/conda-bld/pygrib_1698064180141/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py build_wheel /tmp/tmpsatze10v
  cwd: /Users/runner/miniforge3/conda-bld/pygrib_1698064180141/work
  Building wheel for pygrib (pyproject.toml): finished with status 'error'
  ERROR: Failed building wheel for pygrib
Failed to build pygrib
ERROR: Could not build wheels for pygrib, which is required to install pyproject.toml-based projects

It looks like that error is somewhere in the combination of the cython wrapper for grib_api.h from pygrib, possibly the real copy of grib_api.h from eccodes, and the numpy+cython interface.

pygrib numpy dependency error

I had an "old" python 3.6 environment that I wanted to use pygrib on. I did conda install -c conda-forge pygrib and got:

The following NEW packages will be INSTALLED:

    ecmwf_grib: 1.26.0-0     conda-forge
    jasper:     1.900.1-4    conda-forge
    pygrib:     2.0.2-py36_3 conda-forge

I think did import pygrib in ipython and got:

In [1]: import pygrib
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
RuntimeError: module compiled against API version 0xb but this version of numpy is 0xa
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-6160c29be9fd> in <module>()
----> 1 import pygrib

I then fixed it by doing conda update numpy which gave me:

The following NEW packages will be INSTALLED:

    blas:     1.1-openblas       conda-forge
    openblas: 0.2.20-7           conda-forge

The following packages will be UPDATED:

    llvmlite: 0.17.0-py36_0                  --> 0.22.0-py36_0                 conda-forge
    numba:    0.32.0-np112py36_0             --> 0.37.0-np114py36h210bcc1_0               
    numpy:    1.12.1-py36_0                  --> 1.14.2-py36_blas_openblas_200 conda-forge [blas_openblas]
    scipy:    0.19.0-np112py36_0             --> 1.0.1-py36_blas_openblas_200  conda-forge [blas_openblas]

And everything worked after that (so far). Just wanted to document this in case there is something that can be put in the meta.yaml to force the numpy version build dependency.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.