简体   繁体   English

英特尔 MKL 致命错误:无法加载 mkl_intel_thread.dll

[英]Intel MKL FATAL ERROR: Cannot load mkl_intel_thread.dll

Previously I asked a similar question: cx_Freeze unable fo find mkl: MKL FATAL ERROR: Cannot load mkl_intel_thread.dll以前我问过一个类似的问题: cx_Freeze 无法找到 mkl: MKL FATAL ERROR: Cannot load mkl_intel_thread.dll

But now I have a subtle difference.但现在我有一个微妙的区别。 I want to run the program without installing anaconda, just within a cmd.exe terminal, but it seems I am doing something wrong or that it is not possible.我想在不安装 anaconda 的情况下运行程序,就在cmd.exe终端内,但似乎我做错了什么或者这是不可能的。

After generating my application with python setup.py bdist_msi using cx-freeze , I am able to install and then run it within an anaconda environment, but if I simply open a cmd.exe terminal and run it, I get使用cx-freeze使用python setup.py bdist_msi生成我的应用程序后,我可以在 anaconda 环境中安装并运行它,但如果我只是打开一个cmd.exe终端并运行它,IDA54.exe 终端

INTEL MKL ERROR: The specified module could not be found. mkl_intel_thread.dll.
Intel MKL FATAL ERROR: Cannot load mkl_intel_thread.dll.

However, when running但是,运行时

where  mkl_intel_thread.dll

the dll is found, so I think this means it's registered in the system (I am more used to use Linux, so may be I am wrong).找到了 dll,所以我认为这意味着它已在系统中注册(我更习惯使用 Linux,所以可能是我错了)。

How could I solve this problem?我该如何解决这个问题?

Maybe another DLL necessary for MKL, such as libiomp5md.dll for example, is missing and causes the error.可能 MKL 所需的另一个 DLL(例如libiomp5md.dll )丢失并导致错误。 See Cannot load mkl_intel_thread.dll on python executable , my answer there and its comments.请参阅无法在 python 可执行文件上加载 mkl_intel_thread.dll ,我在那里的回答及其评论。

If this still does not solve your problem, try to manually copy other DLLs from the anaconda environment's library path into the app installation directory and its lib subdirectory.如果这仍然不能解决您的问题,请尝试将 anaconda 环境的库路径中的其他 DLL 手动复制到应用程序安装目录及其lib子目录中。 Once you have found which dependency is missing, you can use the include_files option of cx_Freeze to automatize this step in the setup (as you know).一旦发现缺少哪个依赖项,就可以使用 cx_Freeze 的include_files选项在设置中自动执行此步骤(如您所知)。

Another possible issue would be that you have an incompatible version of MKL installed on your system and that the frozen application finds this wrong one, but this is unlikely unless you have a 32-bit Python installation on a 64-bit system or have installed the application on another system.另一个可能的问题是您的系统上安装了不兼容的 MKL 版本,并且冻结的应用程序发现了这个错误的版本,但这不太可能,除非您在 64 位系统上安装了 32 位 Python 或已经安装了在另一个系统上的应用程序。

EDIT:编辑:

It could still also simply be that the frozen application does not find mkl_intel_thread.dll although where finds it.也可能只是冻结的应用程序没有找到mkl_intel_thread.dll尽管where找到它。 where looks in the system search path given by the PATH environment variable, while Python looks in the modules search path given by sys.path , which usually does not include the content of PATH , see Where is Python's sys.path initialized from? wherePATH环境变量给出的系统搜索路径where查找,而 Python 在sys.path给出的模块搜索路径中sys.path ,通常不包含PATH的内容,请参阅Python 的 sys.path 是从哪里初始化的? But on Windows there is a fallback mechanism for registered DLLs (I don't know how it works).但是在 Windows 上,注册的 DLL 有一个回退机制(我不知道它是如何工作的)。 Anyway, one should not rely on this fallback as soon as one intends to install and run the application on another system, because the necessary DLL may not be installed there.无论如何,一旦打算在另一个系统上安装和运行该应用程序,就不应依赖这种回退,因为那里可能没有安装必要的 DLL。 Thus the necessary dependencies should always be included in the installation directory.因此,安装目录中应始终包含必要的依赖项。

Recently I faced the same error in python3.7 .最近我在 python3.7 中遇到了同样的错误。 I did not have the option of moving Dll, I Solved the problem by just doing.我没有移动 Dll 的选项,我只是通过做来解决了这个问题。

conda install cython

After the cython install all dll's were in proper place.在 cython 安装后,所有 dll 都在正确的位置。

根据https://stackoverflow.com/a/56186333/977566,我将 c:\\windows\\system32\\libiomp5md.dll 重命名为 .bak 并为我修复了它。

set CONDA_DLL_SEARCH_MODIFICATION_ENABLE=1;设置 CONDA_DLL_SEARCH_MODIFICATION_ENABLE=1;

will solve all your problems会解决你所有的问题

For this, it is enough to get the full version of visual c++ program and delete anaconda and folders related to anaconda such as .anaconda or .conda or .matplotlib or AppData/anaconda and... and then install it again For this, it is enough to get the full version of visual c++ program and delete anaconda and folders related to anaconda such as .anaconda or .conda or .matplotlib or AppData/anaconda and... and then install it again
Of course, don't forget that all Intel services must be active当然,不要忘记所有的英特尔服务都必须处于活动状态
https://docs.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170 https://docs.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 特征::BDCSVD<eigen::matrixxcd> 求解器使用 MKL LAPACKE 引发 DGESVD 错误</eigen::matrixxcd> - Eigen::BDCSVD<Eigen::MatrixXcd> solver raises DGESVD error with MKL LAPACKE 无法使用 Meson 使用 MKL 安装 Scipy - Unable to install Scipy with MKL using Meson 英特尔 oneTBB Ubuntu Linux std::execution::par 错误 - Intel oneTBB Ubuntu Linux std::execution::par error 在 `pip` 环境中从 Anaconda 安装 `numpy` 和 `scipy` MKL - Install `numpy` and `scipy` MKL from Anaconda on `pip` Environment 如何在批处理脚本中启动 Intel Power Gadget? - How to start Intel Power Gadget in Batch Script? 如何强制./configure 使用 intel oneAPI 编译器? - How to force ./configure to use intel oneAPI compilers? 在 Intel Mac 上构建或运行 Mac Catalyst 应用程序? - Build or run Mac Catalyst apps on Intel Mac? 如何在我的 python 代码中启用 Intel Extension for Pytorch(IPEX)? - How to enable Intel Extension for Pytorch(IPEX) in my python code? 快速浮点 model 在下一代英特尔编译器上被破坏 - Fast floating point model broken on next-generation intel compiler AMD 架构上是否有与 Intel 的 MSR_SMI_COUNT 等效的寄存器? - Is there an equivalent register to Intel's MSR_SMI_COUNT on AMD architecture?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM