Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
400 views
in Technique[技术] by (71.8m points)

python - NumPy library ImportError: DLL load failed: The specified procedure could not be found

I'm learning python using Visual Studio 2017 on Windows 10. When I'm trying to import NumPy library into my code, this error appears. I have tried uninstalling and reinstalling, looking for libiomp5md.dll per instruction in ImportError: DLL load failed when importing Numpy installed in conda virtual environment but to no prevail.

Traceback (most recent call last):
  File "C:Program FilesPython36libsite-packages
umpycore\__init__.py", line 16, in <module>
from . import multiarray
ImportError: DLL load failed: The specified procedure could not be found.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:Usersadmdocumentsvisual studio 2017ProjectsWeb ScrapingWeb ScrapingWeb_Scraping.py", line 17, in <module>
import numpy
  File "C:Program FilesPython36libsite-packages
umpy\__init__.py", line 142, in <module>
from . import add_newdocs
  File "C:Program FilesPython36libsite-packages
umpyadd_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
  File "C:Program FilesPython36libsite-packages
umpylib\__init__.py", line 8, in <module>
from .type_check import *
  File "C:Program FilesPython36libsite-packages
umpylibype_check.py", line 11, in <module>
import numpy.core.numeric as _nx
  File "C:Program FilesPython36libsite-packages
umpycore\__init__.py", line 26, in <module>
raise ImportError(msg)
ImportError:
Importing the multiarray numpy extension module failed.  Most
likely you are trying to import a failed build of numpy. 
If you're working with a numpy git repo, try `git clean -xdf` (removes all 
files not under version control).  Otherwise reinstall numpy.

Original error was: DLL load failed: The specified procedure could not be found.
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I encountered the same problem with VSCode, and I resolved it by adding the following path to the system environment. After that restart VSCode and everything is OK.

C:Users<Your user name>Anaconda3Libraryin

If the anaconda was not installed in the default directory, please find your own Anaconda3Libraryin.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...