2

Getting the following when I try to import osgeo gdal on Mac. I have installed gdal etc via anaconda.

>>> from osgeo import gdal
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/ste/anaconda/lib/python2.7/site-packages/osgeo/__init__.py", line 21, in <module>
_gdal = swig_import_helper()
File "/Users/ste/anaconda/lib/python2.7/site-packages/osgeo/__init__.py", line 17, in swig_import_helper
_mod = imp.load_module('_gdal', fp, pathname, description)
ImportError: dlopen(/Users/ste/anaconda/lib/python2.7/site- packages/osgeo/_gdal.so, 2): Library not loaded:  @loader_path/./libgssapi_krb5.2.2.dylib
Referenced from: /Users/ste/anaconda/lib/libgdal.20.dylib
Reason: image not found

1 Answer 1

7

Looks like krb5 is a dependency but not installed automatically by anaconda:

conda install krb5

This fix the problem for me!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.