conda-forge / pygrib-feedstock

A conda-smithy repository for pygrib.
BSD 3-Clause "New" or "Revised" License
2 stars 8 forks source link

pygrib numpy dependency error #22

Closed djhoese closed 6 years ago

djhoese commented 6 years ago

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.

ocefpaf commented 6 years ago

I see 0.19.0-np112py36_0 there, so really old :smile:

I do not recommend env updates though, that can be messy. Conda may get confused when trying to solve the dependencies and do things like that or even break channel preference. I usually remove the env and create it again from scratch.

There is nothing we can do in the feedstock, conde should've updated your numpy and I believe that once we move to conda-build 3 it will.

Closing this b/c it is not really an actionable item for the @conda-forge/pygrib team.