NCPP / ocgis

OpenClimateGIS is a set of geoprocessing and calculation tools for CF-compliant climate datasets.
Other
70 stars 19 forks source link

ocgis/osgeo import error (libpoppler.so.71: cannot open shared object file) #489

Closed JiaweiZhuang closed 6 years ago

JiaweiZhuang commented 6 years ago

I got this error when importing ocgis (which imports osgeo)

>>> import ocgis
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/conda/lib/python3.6/site-packages/ocgis/__init__.py", line 5, in <module>
    import osgeo
  File "/opt/conda/lib/python3.6/site-packages/osgeo/__init__.py", line 21, in <module>
    _gdal = swig_import_helper()
  File "/opt/conda/lib/python3.6/site-packages/osgeo/__init__.py", line 17, in swig_import_helper
    _mod = imp.load_module('_gdal', fp, pathname, description)
  File "/opt/conda/lib/python3.6/imp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "/opt/conda/lib/python3.6/imp.py", line 343, in load_dynamic
    return _load(spec)
ImportError: libpoppler.so.71: cannot open shared object file: No such file or directory

Reproducible steps with Docker:

$ docker pull continuumio/miniconda3
$ docker run -it --rm continuumio/miniconda3 /bin/bash
$ conda install -c conda-forge ocgis
$ python
import ocgis

Looks the same as conda-forge/rasterio-feedstock#49 and GenericMappingTools/gmt-python#104, but the fixes there do not work for me...

bekozi commented 6 years ago

Bummer. This is related to https://github.com/NCPP/ocgis/issues/485. Netcdf4-python refactored its time library and required a version pin for the last ocgis release. It's causing a bit of version heck now. Here's a workaround until we get this cleared up:

conda install -c conda-forge cf_units cftime rtree shapely fiona pyproj gdal mpi4py
conda install -c conda-forge netcdf4=1.3.1 --no-deps
git clone https://github.com/NCPP/ocgis.git
cd ocgis && python setup.py install

I tested this under docker and the import worked. You may need to do a full re-install on an existing conda installation.

JiaweiZhuang commented 6 years ago

Thanks, this solves the problem!

bekozi commented 6 years ago

Fixed with https://github.com/conda-forge/netcdf4-feedstock/issues/52