【问题标题】:Unable import gdal into python installed with anaconda (MacOSX)无法将 gdal 导入使用 anaconda (MacOSX) 安装的 python
【发布时间】:2016-02-25 16:31:12
【问题描述】:

当我尝试在 Mac 上导入 osgeo gdal 时得到以下信息。我已经通过 anaconda 安装了 gdal 等。

>>> 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

【问题讨论】:

    标签: python python-2.7 anaconda gdal osgeo


    【解决方案1】:

    看起来 krb5 是一个依赖项,但不是由 anaconda 自动安装的:

    conda install krb5
    

    这为我解决了问题!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-03-21
      • 1970-01-01
      • 1970-01-01
      • 2020-10-30
      • 2018-01-31
      • 2016-02-22
      • 2016-01-30
      相关资源
      最近更新 更多