[PYTHON] Error in ordinal number when importing Numpy in Anaconda environment of Windows

This is the first post I was addicted to installing Anaconda on windows8.1 and using numpy etc.

environment

windows8.1 64bit Anaconda3 conda version:4.7.12 python version:3.7.4 numpy:1.9.3 mkl:2019.4

Symptoms

When you run import numpy, Intel MKL_FATAL_ERROR: Cannot load mkl_intel_thread.dll.

Ordinal 241 is a dynamic library It was not found in C: Users \ username \ Anaconda3 \ envs \ environment name \ Library \ bin \ mkl_intel_thread.dll.

Error occurs. what the hell?

Cause

It seems that mkl_intel_thread.dll used by numpy cannot be loaded properly.

In my case, when I installed the DTM software that I do as a hobby, I installed mkl_intel_thread.dll in C: Windows \ system32. It is said that the priority of the path is higher in system32 than in Anaconda and it has been read.

Solution

In my case, I solved it with the following command

set CONDA_DLL_SEARCH_MODIFICATION_ENABLE=1

Reference site: https://conda.io/projects/conda/en/latest/user-guide/troubleshooting.html#numpy-mkl-library-load-failed

If you have Amplitube, ASIO4ALL, etc. installed, you will get the error in this article.

What I tried

(I didn't like it, but if the above method doesn't help, I might try it.

  1. Delete MKL related files from C: \ Windows \ System32
  2. Downgrade of numpy, mkl
  3. Downgrade "anaconda" to 5.2.0 with Anaconda Navigator

Afterword

Anaconda is convenient, but I feel that there are many conflicts and errors. It may be faster to pip install from scratch obediently

Postscript

set CONDA_DLL_SEARCH_MODIFICATION_ENABLE=1 Then you have to type set CONDA_DLL_SEARCH_MODIFICATION_ENABLE = 1 every time you open the command prompt. Open System Properties in Control Panel> System and Security> System> Advanced System Settings It was better to newly register as follows from detailed settings> environment variables> system environment variables.

Variable name: CONDA_DLL_SEARCH_MODIFICATION_ENABLE Variable value: 1

Now you don't have to type set CONDA_DLL_SEARCH_MODIFICATION_ENABLE = 1 every time you open the command prompt

Recommended Posts

Error in ordinal number when importing Numpy in Anaconda environment of Windows
About import error of numpy and scipy in anaconda
Various Anaconda settings in Windows 10 environment
I got an SSL Error when I installed Anaconda in a new environment, so I solved it (Windows10, Anaconda3-2019.10)
[Python] Reason for dtype "int32" in Numpy (Windows environment) (as of September 2020)
Run PIFuHD in Windows + Anaconda + Git Bash environment
Browser specification of Jupyter Notebook in Windows environment
Install Python 3.5.1 + numpy + scipy + α in Windows environment
Error running Jupyter Notebook in Anaconda virtual environment
What to do when SSL error occurs in pip in Windows10, miniconda, VScode environment
How to install the deep learning framework Tensorflow 1.0 in the Anaconda environment of Windows
virtualenvwrapper in windows environment
Seaborn, matplotlib garbled characters resolved in Windows10, Anaconda virtual environment
Examine the margin of error in the number of deaths from pneumonia
Double-click ipynb in windows + anaconda environment to open with jupyter-notebook
Use Anaconda in pyenv environment
Error when starting gazebo (gzserver: symbol lookup error: /usr/lib/x86_64-linux-gnu/libgazebo_common.so.9: undefined symbol :)
An error occurs when importing japandas (problem unsolved)
When TypeError appears when importing tensorFlow
Error when playing with python
[Error] Symbol not found: _PyUnicodeUCS2_Compare
polyfit error when installing matplotlib
Solved the problem that sqlite3 got undefined error when cross-compiling Golang
OS Error: could not find or load spatialindex_c-64.dll when importing geopandas
Error in ordinal number when importing Numpy in Anaconda environment of Windows
PATH when using ANACONDA virtual environment with Pycharm (as of Mac 2020/10/03)
# Solution when pip install gives an error when using Anaconda on Windows 10
Morphological analysis of sentences containing recent words in Windows10 64bit environment
[Windows + anaconda] Automatically activate the environment when the command prompt is started
[Question] In sk-learn random forest regression, an error occurs when the number of parallels is set to -1.
Error when building mac python environment
Install scrapy in python anaconda environment
install tensorflow in anaconda + python3.5 environment
Fix setuptools missing error in anaconda
About import error of PyQt5.QtWidgets (Anaconda)
UnicodeDecodeError occurs in pip (Windows environment)
Error "Entry point not found" when starting Jupyter Notebook in virtual environment
[Python] Calculate the number of digits required when filling in 0s [Note]
What to do if an error occurs when importing numpy with VScode
[Django] sqlite version error when running python manage.py in aws cloud9 environment
What to do when the warning "The environment is in consistent ..." appears in the Anaconda environment
[Python] Precautions when finding the maximum and minimum values in a numpy array with a small number of elements