3

I am trying to install import a gdal library.

from osgeo import ogr

but I get the following error

ImportError: dlopen(/anaconda3/lib/python3.6/site-packages/osgeo/_gdal.cpython-36m-darwin.so, 2): Library not loaded: @rpath/libtiff.5.dylib
  Referenced from: /anaconda3/lib/libgdal.20.dylib
  Reason: Incompatible library version: libgdal.20.dylib requires version 9.0.0 or later, but libtiff.5.dylib provides version 8.0.0

I installed gdal trough conda install gdal

Tom Burrows
  • 2,225
  • 2
  • 29
  • 46
emax
  • 6,965
  • 19
  • 74
  • 141
  • Maybe try `ulimit -n 2048` or somesuch. – Mark Setchell Apr 19 '19 at 18:23
  • how did you install `osgeo` and/or `gdal`? How did you install python3? Note that on Mac OS python 2.7.2 is installed by default. This error is clearly a dependency issue so something went wrong during installation or package dependencies are broken. – Marek R Apr 23 '19 at 13:18
  • @MarekR I installed `gdal` trough `conda`. but I don't remember how I installed `python3`. I know that there is some error. – emax Apr 23 '19 at 13:23
  • Can you try to update the libtiff library ? –  Apr 23 '19 at 13:27
  • 1
    This issue has been solved here: https://stackoverflow.com/questions/37700484/python-gdal-does-not-install-on-mac-osx-el-capitan – Rock K Apr 23 '19 at 13:27
  • I'm not familiar with `conda` anyway I'm sure problem is in package definition or installation of package was unsuccessful. Maybe you can try force installation of `libtiff` in required version. – Marek R Apr 23 '19 at 13:27
  • @MarekR I am trying to install it – emax Apr 23 '19 at 13:30
  • Now I get another error : `ImportError: dlopen(/anaconda3/lib/python3.6/site-packages/osgeo/_gdal.cpython-36m-darwin.so, 2): Library not loaded: @rpath/libpoppler.71.dylib Referenced from: /anaconda3/lib/libgdal.20.dylib Reason: image not found ` – emax Apr 23 '19 at 13:34
  • Some progress. Looks like you are using some unofficial package repository, since when I'm inspecting coda repositories I see [much older versions of `libtiff`](https://anaconda.org/conda-forge/libtiff). – Marek R Apr 23 '19 at 13:36
  • @MarekR now I have installed it and I get the errore above `ImportError: dlopen(/anaconda3/lib/python3.6/site-packages/osgeo/_gdal.cpython-36m-darwin.so, 2): Library not loaded: @rpath/libpoppler.71.dylib Referenced from: /anaconda3/lib/libgdal.20.dylib Reason: image not found` – emax Apr 23 '19 at 13:43

0 Answers0