close

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

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error ImportError: DLL load failed when importing Numpy installed in conda virtual environment in python. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How ImportError: DLL load failed when importing Numpy installed in conda virtual environment Error Occurs?

Today I get the following error ImportError: DLL load failed when importing Numpy installed in conda virtual environment in python.

How To Solve ImportError: DLL load failed when importing Numpy installed in conda virtual environment Error ?

  1. How To Solve ImportError: DLL load failed when importing Numpy installed in conda virtual environment Error ?

    To Solve ImportError: DLL load failed when importing Numpy installed in conda virtual environment Error I installed Dependency Walker to investigate what was going on. Even though the dll versions were different, but Dependency Walker said it was okay.

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

    To Solve ImportError: DLL load failed when importing Numpy installed in conda virtual environment Error I installed Dependency Walker to investigate what was going on. Even though the dll versions were different, but Dependency Walker said it was okay.

Solution 1

Uninstall and install numpy again.

pip uninstall numpy
pip install numpy

Then try import again, it should work. That is what I did

Solution 2

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.

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read