我一直在尝试使用 ./configure --with-python 从源代码安装 python GDAL 绑定但是当我尝试
from osgeo import gdal
我得到:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "osgeo/__init__.py", line 21, in <module>
_gdal = swig_import_helper()
File "osgeo/__init__.py", line 17, in swig_import_helper
_mod = imp.load_module('_gdal', fp, pathname, description)
ImportError: libgdal.so.1: cannot open shared object file: No such file or directory
在我看来,swig 是个错误。