我使用
conda install -c conda-forge gal
安装GDAL包。然而,在导入包时,我遇到了以下错误。
>>> import gdal Traceback (most recent call last): File "", line 1, in File "/Users/name/anaconda/lib/python3.6/site-packages/gdal.py", line 2, in from osgeo.gdal import deprecation_warn File "/Users/name/anaconda/lib/python3.6/site-packages/osgeo/__init__.py", line 21, in _gdal = swig_import_helper() File "/Users/name/anaconda/lib/python3.6/site-packages/osgeo/__init__.py", line 17, in swig_import_helper _mod = imp.load_module('_gdal', fp, pathname, description) File "/Users/name/anaconda/lib/python3.6/imp.py", line 242, in load_module return load_dynamic(name, filename, file) File "/Users/name/anaconda/lib/python3.6/imp.py", line 342, in load_dynamic return _load(spec) ImportError: dlopen(/Users/name/anaconda/lib/python3.6/site-packages/osgeo/_gdal.cpython-36m-darwin.so, 2): Library not loaded: @rpath/libicui18n.58.dylib Referenced from: /Users/name/anaconda/lib/libgdal.20.dylib Reason: image not found我尝试了以下方法,但它们对我没有用:
conda upgrade numpy
conda install libpng
有人知道我该怎么做吗?