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
117 stars 37 forks source link

not finding libpoppler (Py3) #16

Closed scollis closed 6 years ago

scollis commented 6 years ago

Using conda package (env file coming soon). I get

>>> import Nio
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/scollis/anaconda/envs/pchange/lib/python3.6/site-packages/PyNIO/Nio.py", line 83, in <module>
    from _nio import *
ImportError: dlopen(/Users/scollis/anaconda/envs/pchange/lib/python3.6/site-packages/PyNIO/_nio.cpython-36m-darwin.so, 2): Library not loaded: @rpath/libpoppler.66.dylib
  Referenced from: /Users/scollis/anaconda/envs/pchange/lib/libgdal.20.dylib
  Reason: image not found
>>> 

I have Poppler 0.61 installed.. There is no conda package on conda-forge for poppler-0.66

scollis commented 6 years ago
name: pchange
channels:
   - conda-forge
   - ncar
dependencies:
   - python=3.6
   - numpy
   - matplotlib
   - cartopy
   - jupyter
   - netcdf4
   - metpy
   - siphon
   - pynio=dev
   - xarray
   - scipy
khallock commented 6 years ago

Hi @scollis,

There is currently an issue with certain dependencies on conda-forge causing these "library not loaded" errors, particularly when libgdal gets involved. The workaround we've found is to explicitly install poppler=0.52 and xerces-c=3.1 alongside PyNIO: conda install -c conda-forge poppler=0.52 xerces-c=3.1 or conda create -c ncar -c conda-forge pynio=dev poppler=0.52 xerces-c=3.1

Ideally this won't be necessary in the future, but it should hopefully work for now.

Please let us know if you're still experiencing issues getting PyNIO to work after trying this.

scollis commented 6 years ago

Thanks! Adding

Has Nio importing now.

-- Dr Scott Collis Atmospheric Scientist and DoE-ARM Translator Environmental Science Division Argonne National Laboratory 9700 S Cass Ave, Argonne IL 60439 Cell: +1 630-235-8025

If I have seen further it is by standing on ye sholders of Giants.

On Dec 4, 2017 at 6:23 PM, Kevin Hallock notifications@github.com wrote:

Hi @scollis https://github.com/scollis,

There is currently an issue with certain dependencies on conda-forge causing these "library not loaded" errors, particularly when libgdal gets involved. The workaround we've found is to explicitly install poppler=0.52 and xerces-c=3.1 alongside PyNIO: conda install -c conda-forge poppler=0.52 xerces-c=3.1 or conda create -c ncar -c conda-forge pynio=dev poppler=0.52 xerces-c=3.1

Ideally this won't be necessary in the future, but it should hopefully work for now.

Please let us know if you're still experiencing issues getting PyNIO to work after trying this.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/NCAR/pynio/issues/16#issuecomment-349153104, or mute the thread https://github.com/notifications/unsubscribe-auth/AAyYB1gQr1vyjQgtC0GsKXLfcG4UMY6Xks5s9I0SgaJpZM4Q1WGX .

scollis commented 6 years ago

I was able to open HRRR data in grib using Nio as an engine to X-Array (which is what I wanted to do)..

Here is my environment.yml file

name: pchange
channels:
   - conda-forge
   - ncar
dependencies:
   - python=3.6
   - poppler=0.52
   - xerces-c=3.1
   - numpy
   - matplotlib
   - cartopy
   - jupyter
   - netcdf4
   - metpy
   - siphon
   - pynio=dev
   - xarray
   - scipy