Python运行异常
问题描述
During handling of the above exception, another exception occurred:Traceback (most recent call last):File "<stdin>", line 1, in <module>File "D:\Anaconda3\lib\site-packages\numpy\__init__.py", line 142, in <module>from . import coreFile "D:\Anaconda3\lib\site-packages\numpy\core\__init__.py", line 50, in <module>raise ImportError(msg)ImportError:IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!Importing the numpy C-extensions failed. This error can happen formany reasons, often due to issues with your setup or how NumPy wasinstalled.We have compiled some common reasons and troubleshooting tips at:/devdocs/user/troubleshooting-importerror.htmlPlease note and check the following:* The Python version is: Python3.8 from "D:\Anaconda3\python.exe"* The NumPy version is: "1.18.5"and make sure that they are the versions you expect.Please carefully study the documentation linked above for further help.Original error was: DLL load failed while importing _multiarray_umath: 找不到指定的模块。
解决方案
pip install --upgrade numpy
之后,再次执行
import numpy