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

前端 未结 12 1608
时光取名叫无心
时光取名叫无心 2021-01-30 00:27

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

相关标签:
12条回答
  • 2021-01-30 00:41

    The following worked for me

    conda install  -f  numpy
    
    0 讨论(0)
  • 2021-01-30 00:44

    In case anyone has a similar issue and gets errors that libmkl_p4m.so or libmkl_p4.so cannot be found (this occurred for me when calling certain numpy functions), I tried reinstalling / updating different python modules and reverting / updating to various versions of Anaconda, and neither worked. However I found that completely uninstalling anaconda and re-installing it (to version 4.4.10) solved the issue.

    0 讨论(0)
  • 2021-01-30 00:47

    I ran into this problem after installing anaconda3 (vesion 4.2.0). The fix for me was simple, and I was able to keep using mkl. Just update to the latest numpy version.

    conda update numpy
    
    0 讨论(0)
  • 2021-01-30 00:49

    It is also possible that you are running Python in a folder which does not exist.

    Solution is simply go to another folder.

    See this question: sh: 0: getcwd() failed: No such file or directory on cited drive

    0 讨论(0)
  • 2021-01-30 00:53

    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.

    0 讨论(0)
  • 2021-01-30 00:53

    None of the above answers worked for me. In my case, @Nehal J Wani's comment below the OP's question led to the solution: As stated in the linked Intel support document, a single dynamic library can be used to link to the MKL.

    After editing my project's Makefile to replace the following libraries -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core with -lmkl_rt and re-building, the error disappeared.

    0 讨论(0)
提交回复
热议问题