当前位置: 代码迷 >> 综合 >> python gdal 库中gdal_array 类库出现Intel MKL FATAL ERROR—重新安装numpy类库
  详细解决方案

python gdal 库中gdal_array 类库出现Intel MKL FATAL ERROR—重新安装numpy类库

热度:95   发布时间:2023-11-25 11:15:52.0

根据调试,发现主要是进行 array运算时出现的该异常

from osgeo import ogr
from osgeo import gdal
from osgeo import gdal_array as ga
import os,math,ogr,osrdef calculateNdvi(clip_raster,ndvi_raster):print("calculateNdvi...")img_array = ga.LoadFile(clip_raster)a = img_array[3]-img_array[2]b = img_array[3]+img_array[2]ndvi_array = a/boutndvi = ga.SaveArray(ndvi_array,ndvi_raster,format="GTiff",prototype=clip_raster)outndvi = None

异常错误:

C:\ProgramData\Anaconda3\python.exe “C:\Program Files\JetBrains\PyCharm Community Edition 2017.3.3\helpers\pydev\pydevd.py” –multiproc –qt-support=auto –client 127.0.0.1 –port 49597 –file F:/20180703/ClipRaster.py
pydev debugger: process 11144 is connecting

Connected to pydev debugger (build 173.4301.16)
pathManage…
calculateNdvi…
Intel MKL FATAL ERROR: Cannot load mkl_intel_thread.dll.

Process finished with exit code 2

解决方法:
重新下载并安装numpy库:https://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy

管理员身份运行 Anaconda Prompt
安装pip : conda install -c conda-forge pip
卸载numpy: pip uninstall numpy
重新安装numpy:pip install “F:\20180703\文档\numpy-1.14.5+mkl-cp36-cp36m-win_amd64.whl”

这里写图片描述

  相关解决方案