Intel MKL FATAL ERROR: Cannot load libmkl_avx2.so or libmkl_def.so

Chris Parry picture Chris Parry · Apr 16, 2016 · Viewed 48.4k times · Source

I am running a python script and I get this error:

Intel MKL FATAL ERROR: Cannot load libmkl_avx2.so or libmkl_def.so.

Both files are present in the anaconda2/lib directory. How can I fix this error? Thanks.

Answer

Zaikun Xu picture Zaikun Xu · May 1, 2016

If you use conda, try with these two commands:

conda install nomkl numpy scipy scikit-learn numexpr
conda remove mkl mkl-service

It should fix your problem.