1

I want to create an .exe file from .py file using Auto Py To Exe. Everything works fine, file is created, but when I try to open it, I have an error:

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

and then console goes down.

I tried to find it:

U:\>where mkl_intel_thread.dll
INFO: Could not find files for the given pattern(s).

It seems like it doesn't exist on my computer.

How could I solve this problem? Thanks for any help.

ASAS
  • 41
  • 8

1 Answers1

0

Possible workarounds for your issue are given below:

  1. Here the problem is it links to three separate libraries instead of one library or try setting the environment or do preload dll etc.

For Linux:

export LD_PRELOAD=/opt/intel/mkl/lib/intel64/libmkl_def.so:/opt/intel/mkl/lib/intel64/libmkl_avx2.so:/opt/intel/mkl/lib/intel64/libmkl_core.so:/opt/intel/mkl/lib/intel64/libmkl_intel_lp64.so:/opt/intel/mkl/lib/intel64/libmkl_intel_thread.so:/opt/intel/lib/intel64_lin/libiomp5.so

For Windows: setting env by mkl/bin/mklvars.bat intel64, then run your python in same environment

or

in Python to add the library manually sys.path.append(" your path to the library")

  1. Refer this: Pyinstaller numpy "Intel MKL FATAL ERROR: Cannot load mkl_intel_thread.dll"

  2. Manually copying the required dll from inside numpy/core, into the dist folder that py2exe creates, not outside of it.

Refer this for more information: https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/python-mkl-error/m-p/1163247