[PYTHON] About the bug that anaconda fails to import numpy and scipy

import numpy error

If you put anaconda on Windows and import numpy, I have failed.

image

It means that the specified procedure cannot be found.

Also, even if numpy is created, the error "The specified procedure cannot be found" will appear even when importing scipy.io.

There was a person with a similar error and I thought this might be the case, but it didn't go away. http://qiita.com/eqs/items/79620732946939c7e3d1

You can find out the cause of such an error by using a tool called Dependency Walker (http://www.dependencywalker.com/).

Dependency Walker

So which file should I open with Dependency Walker? The error was in "C: \ Anaconda3 \ lib \ site-packages \ numpy \ core \ __ init__.py" importing multiarray. Therefore, open "C: \ Anaconda3 \ Lib \ site-packages \ numpy \ core \ multiarray.pyd" and check.

image

This means that system32's mkl_intel_thread.dll is useless.

Some machines did not make an error, so by comparison, mkl_intel_thread.dll does not turn red. Besides! !! On that machine, the mkl_intel_thread.dll associated with multiarray.pyd is not in system32 but in "C: \ Anaconda3 \ Library \ bin"!

Even on the machine with the error, mkl_intel_thread.dll is in s "C: \ Anaconda3 \ Library \ bin"!

In addition, system32's mkl_intel_thread is version 10 and anaconda3 is version 11.

This is the cause!

What is MKL

MKL is a Math Kernel Library developed by intel.

Apparently this is needed in the latest numpy (and not in version 10).

In this error, it seems that System32 was given priority for reference.

After all

It was solved by deleting mkl_intel_thread.dll of system32.

image

Recommended Posts

About the bug that anaconda fails to import numpy and scipy
It's not easy to write Python, it's easy to write numpy and scipy
Personal notes about the integration of vscode and anaconda
See the power of speeding up with NumPy and SciPy
This and that about pd.DataFrame
About Numpy array and asarray
Bug that unnecessary files are created when the -i and -e options are added to the sed command.
About Boxplot and Violinplot that visualize the variability of independent data
Try to write a program that abuses the program and sends 100 emails
Numpy 1.19.4 error RuntimeError: The current Numpy installation fails to pass a sanity check due to a bug in the windows runtime.
[Python] How to import the library
About import error of PyQt5.QtWidgets (Anaconda)
Python patterns that have been released to the world and have been scrutinized later
The file name was bad in Python and I was addicted to import
Address to the bug that node.surface cannot be obtained with python3 + mecab