Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
JiaweiZhuang opened this issue Jul 17, 2018 · 3 comments
Labels

Comments

@JiaweiZhuang
Copy link

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/pygmt#104, but the fixes there do not work for me...

@bekozi
Copy link
Contributor

bekozi commented Jul 17, 2018

Bummer. This is related to #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
Copy link
Author

Thanks, this solves the problem!

@bekozi bekozi added the bug label Jul 30, 2018
@bekozi
Copy link
Contributor

bekozi commented Jul 30, 2018

Fixed with conda-forge/netcdf4-feedstock#52

@bekozi bekozi closed this as completed Jul 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants