4

I'm trying to compile a python program in py2exe. It is returning a bunch of missing modules, and when I run the executable, it says: "MKL FATAL ERROR: Cannot load mkl_intel_thread.dll"

All my 'non-plotting' scripts work perfectly, just scripts utilizing 'matplotlib', and 'pyqtgraph' don't work.

I've even found the file in Numpy/Core/mkl_intel_thread.dll, and placed it into the folder with the .exe, and it still doesn't work. Does anyone have any idea how this can be solved?

I'm using Anaconda Python 3.4, and matplotlib 1.5.1

John Scolaro
  • 695
  • 6
  • 20

2 Answers2

5

Never mind! I managed to solve it, by copying the required dll from inside numpy/core, into the dist folder that py2exe creates, not outside of it.

John Scolaro
  • 695
  • 6
  • 20
  • Note it is found under: `C:\path\to\miniconda\pkgs\mkl-2018.0.2-1\Library\bin` – phyatt Mar 29 '18 at 02:07
  • Also on windows, I had to copy 4 dlls into the folder: `mkl_core.dll`, `mkl_intel_thread.dll`, `mkl_mc3.dll` and `mkl_rd.dll`. – phyatt Mar 29 '18 at 02:41
0

EDIT: The best way to fix this is to use the nomkl option with conda:

conda install nomkl numpy scipy scikit-learn numexpr

MY PREVIOUS ANSWER: I had this same issue on MAC OSX using pyqtgraph with py2app. I had to put the libmkl_avx2.dylib and libmkl_mc.dylib in the application package. Specifically, I had to right-click on the app and "Show Package Contents". I put the files in the folder MYAPPLICATION.app/Contents/Frameworks/

jmtennant
  • 89
  • 1
  • 3