尝试在python中导入gdal时未找到图像错误

时间:2016-04-26 14:44:27

标签: python numpy anaconda gdal

ImportError: dlopen(/Users/rit/anaconda/lib/python2.7/site-packages/osgeo/_gdal.so, 2): Library not loaded: @rpath/libjpeg.8.dylib
  Referenced from: /Users/rit/anaconda/lib/libgdal.20.dylib
  Reason: image not found

当我尝试import gdal时,我收到了上述错误。我该如何解决?我使用conda uninstall gdalconda install gdal

重新安装了gdal

1 个答案:

答案 0 :(得分:-1)

看起来由于某种原因未安装jpeg包。你能尝试conda install jpeg吗? conda info jpeg报告的内容是什么?

也许尝试在新环境中这样做。像

这样的东西
conda create -n gdal-test python=2.7 gdal
source activate gdal-test

然后import gdal