ImportError: DLL load failed when importing Numpy installed in conda virtual environment

后端 未结 6 2028
北荒
北荒 2020-12-05 02:36

In Windows, I created a Conda virtual environment with the command

conda create -n test python=2.7 pandas scipy matplotlib numpy

Once it is

6条回答
  •  南方客
    南方客 (楼主)
    2020-12-05 03:22

    Unlike @Rafael, for me, libiomp5md.dll wasn't the issue. I installed Dependency Walker to investigate what was going on. Even though the dll versions were different, but Dependency Walker said it was okay.

    What was wrong though, was that mkl_intel_thread.dll had warnings (red icon). If you're using Win 8++, ignore the api-win and ext-ms issues as Dependency Walker wasn't updated for new Windows versions and doesn't recognise Windows new APIs.

    My solution is to copy all mkl_*.dlls from the former to the latter:

    • \Anaconda2\Library\bin
    • \Anaconda2\Lib\site-packages\numpy\core

    I was able to import numpy and sklearn after that.

提交回复
热议问题