NCAR / pynio

PyNIO is a multi-format data I/O package with a NetCDF-style interface
http://www.pyngl.ucar.edu/Nio.shtml
Apache License 2.0
112 stars 37 forks source link

Clean environment with latest PyNio on conda-forge appears to be broken #18

Closed Meteodan closed 6 years ago

Meteodan commented 6 years ago

Hi all,

Today I was unable to import Nio after updating my default anaconda environment, so I reproduced the problem with a clean environment:

[ddawson@dawsonlaptop notebooks (master)]$ conda create --name pyniotest pynio Solving environment: done

## Package Plan ##

environment location: /Users/ddawson/anaconda/envs/pyniotest

added / updated specs:

The following packages will be downloaded:

package                    |            build
---------------------------|-----------------
certifi-2018.4.16          |           py27_0         142 KB  conda-forge
libpq-9.6.3                |                0          89 KB  conda-forge
------------------------------------------------------------
                                       Total:         232 KB

The following NEW packages will be INSTALLED:

boost:           1.66.0-py27_1         conda-forge
boost-cpp:       1.66.0-1              conda-forge
bzip2:           1.0.6-1               conda-forge
ca-certificates: 2018.4.16-0           conda-forge
cairo:           1.14.10-0             conda-forge
certifi:         2018.4.16-py27_0      conda-forge
curl:            7.59.0-1              conda-forge
expat:           2.2.5-0               conda-forge
fontconfig:      2.12.6-0              conda-forge
freetype:        2.8.1-0               conda-forge
freexl:          1.0.5-0               conda-forge
g2clib:          1.6.0-5               conda-forge
geos:            3.6.2-1               conda-forge
geotiff:         1.4.2-1               conda-forge
gettext:         0.19.8.1-0            conda-forge
giflib:          5.1.4-0               conda-forge
glib:            2.55.0-0              conda-forge
hdf4:            4.2.13-0              conda-forge
hdf5:            1.10.1-2              conda-forge
hdfeos2:         2.19.1-8              conda-forge
hdfeos5:         5.1.16-0              conda-forge
icu:             58.2-0                conda-forge
intel-openmp:    2018.0.0-8
jasper:          1.900.1-4             conda-forge
jpeg:            9b-2                  conda-forge
json-c:          0.13.1-h470a237_0     conda-forge
kealib:          1.4.7-4               conda-forge
krb5:            1.14.6-0              conda-forge
libdap4:         3.18.3-2              conda-forge
libffi:          3.2.1-3               conda-forge
libgdal:         2.2.4-2               conda-forge
libgfortran:     3.0.1-h93005f0_2
libiconv:        1.15-0                conda-forge
libkml:          1.3.0-6               conda-forge
libnetcdf:       4.6.1-2               conda-forge
libpng:          1.6.34-0              conda-forge
libpq:           9.6.3-0               conda-forge
libspatialite:   4.3.0a-19             conda-forge
libssh2:         1.8.0-2               conda-forge
libtiff:         4.0.9-0               conda-forge
libuuid:         1.0.3-1               conda-forge
libxml2:         2.9.8-0               conda-forge
mkl:             2018.0.2-1
mkl_fft:         1.0.2-py27_0          conda-forge
mkl_random:      1.0.1-py27_0          conda-forge
ncurses:         5.9-10                conda-forge
numpy:           1.14.2-py27ha9ae307_1
openjpeg:        2.3.0-2               conda-forge
openssl:         1.0.2o-0              conda-forge
pcre:            8.41-1                conda-forge
pip:             9.0.3-py27_0          conda-forge
pixman:          0.34.0-2              conda-forge
poppler:         0.61.1-3              conda-forge
poppler-data:    0.4.9-0               conda-forge
proj4:           4.9.3-5               conda-forge
pynio:           1.5.0-py27_4          conda-forge
python:          2.7.15-0              conda-forge
readline:        7.0-0                 conda-forge
setuptools:      39.1.0-py27_0         conda-forge
sqlite:          3.20.1-2              conda-forge
tk:              8.6.7-0               conda-forge
wheel:           0.31.0-py27_0         conda-forge
xerces-c:        3.2.0-0               conda-forge
xz:              5.2.3-0               conda-forge
zlib:            1.2.11-0              conda-forge

My condarc is as follows:

channels:
  - conda-forge
  - ncar
  - defaults

And here is the error message I get upon attempting to import Nio:

[ddawson@dawsonlaptop notebooks (master)]$ source activate pyniotest
(pyniotest) [ddawson@dawsonlaptop notebooks (master)]$ python
Python 2.7.15 | packaged by conda-forge | (default, May  8 2018, 14:53:14)
[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import Nio
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/ddawson/anaconda/envs/pyniotest/lib/python2.7/site-packages/PyNIO/Nio.py", line 83, in <module>
    from nio import *
ImportError: dlopen(/Users/ddawson/anaconda/envs/pyniotest/lib/python2.7/site-packages/PyNIO/nio.so, 2): Library not loaded: @rpath/libjson-c.2.dylib
  Referenced from: /Users/ddawson/anaconda/envs/pyniotest/lib/libgdal.20.dylib
  Reason: image not found

Any ideas on how to fix this? Many thanks!

Meteodan commented 6 years ago

Update: I temporarily solved this by reverting to json-c version 0.12.1. It appears that the dependencies of libgdal haven't been updated to reflect recent updates to json-c: if I'm reading the dependencies right, it doesn't specify a particular version of json-c, but maybe it needs to now?

ocefpaf commented 6 years ago

This is mostly a packaging issue on the conda-forge side. I pulled the new json-c package and we'll rebuild things with the proper pinning soon. It should be OK for now but let me know if you experience more issues.

PS: this issue can be closed and encourage to open issue in our feedstocks for packaging issues like this one.

Meteodan commented 6 years ago

Thank you for the reply and for fixing this! I will let you know if there are any issues.

And I will remember to open issues in the feedstock if I have any similar problems in the future!

abrammer commented 6 years ago

Similar to this issue, the new version of libkea (1.4.9x) breaks hdf5 and json-c for pynio

If someone finds their way here this works:

channels:
    - conda-forge/label/dev
    - conda-forge
    - defaults
dependencies:
    - python=3.6
    - pynio
    - kealib=1.4.7