问题记录——Intel MKL FATAL ERROR: Cannot load mkl_intel_thread.dll.

本文详细介绍了在Anaconda环境中遇到Numpy MKL库加载失败的常见原因及解决方法。主要分为两部分,一是未激活环境,二是第三方软件在C:WindowsSystem32中安装了不兼容的MKL或Intel OpenMP文件。提供了移除相关文件、调整DLL加载模式等解决方案。
部署运行你感兴趣的模型镜像

今天遇到的一个问题:
在这里插入图片描述
然后在https://conda.io/projects/conda/en/latest/user-guide/troubleshooting.html#numpy-mkl-library-load-failed
找到了解决方法。

它上面说到有两种情况导致这个问题发生:

1.没有activate你的环境
2.Another software vendor has installed MKL or Intel OpenMP (libiomp5md.dll) files into the C:\Windows\System32 folder. These files are being loaded before Anaconda’s and they’re not compatible.
就是你通过别的地方安装了MKL或者Intel OpenMP在C:\Windows\System32文件夹中。

然后他的解决办法是(英语水平太差了,勉强看的懂,说不清,遇到同样问题的人试着看吧):
Remove any MKL-related files from C:\Windows\System32. We recommend renaming them to add .bak to the filename to effectively hide them. Observe if any other software breaks. Try moving the DLL files alongside the .exe of the software that broke. If it works again, you can keep things in the moved state - Anaconda doesn’t need MKL in System32, and no other software should need it either. If you identify software that is installing software here, please contact the creators of that software. Inform them that their practice of installing MKL to a global location is fragile and is breaking other people’s software and wasting a lot of time. See the list of guilty parties below.

You may try a special DLL loading mode that Anaconda builds into Python. This changes the DLL search path from system32 first to system32 as another entry on PATH, allowing libraries in your conda environment to be found before the libraries in system32. Control of this feature is done with environment variables. Only python builds beyond these builds will react to these environment variables:

Python 2.7.15 build 14
Python 3.6.8 build 7
Python 3.7.2 build 8

To update Python from the defaults channel:

conda update -c defaults python

Control environment variables:

  • CONDA_DLL_SEARCH_MODIFICATION_ENABLE
  • CONDA_DLL_SEARCH_MODIFICATION_DEBUG
  • CONDA_DLL_SEARCH_MODIFICATION_NEVER_ADD_WINDOWS_DIRECTORY
  • CONDA_DLL_SEARCH_MODIFICATION_NEVER_ADD_CWD

These should be set to a value of 1 to enable them. For example, in an anaconda prompt terminal:

set CONDA_DLL_SEARCH_MODIFICATION_ENABLE=1

您可能感兴趣的与本文相关的镜像

Python3.8

Python3.8

Conda
Python

Python 是一种高级、解释型、通用的编程语言,以其简洁易读的语法而闻名,适用于广泛的应用,包括Web开发、数据分析、人工智能和自动化脚本

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值