我在Red Hat EL(7.3)集群上安装并运行了python 3.5 gdal 2.2.4。我能够在python中导入gdal和osgeo,但是当我尝试导入gdal_array时,我得到一个导航错误:
import gdal
import osgeo
import osr
from osgeo import gdal_array
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/.local/lib/python3.5/site-packages/osgeo/gdal_array.py", line 28, in <module>
_gdal_array = swig_import_helper()
File "/.local/lib/python3.5/site-packages/osgeo/gdal_array.py", line 24, in swig_import_helper
_mod = imp.load_module('_gdal_array', fp, pathname, description)
File "/opt/anaconda3-4.2.0/lib/python3.5/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/opt/anaconda3-4.2.0/lib/python3.5/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: /.local/lib/python3.5/site-packages/osgeo/_gdal_array.cpython-35m-x86_64-linux-gnu.so: undefined symbol: _ZdlPvm
我使用Anaconda将gdal安装到我的本地用户帐户(并尝试过pip)。其他一些信息:gcc版本是[GCC 4.4.7 20120313(Red Hat 4.4.7-1)]。我不确定导致错误的是什么。有人有类似的问题吗?