重新安装jupyter notebook后 numpy无法使用 DLL load failed while importing _multiarray_umath: 找不到指定的模块

  • Post author:
  • Post category:其他

问题:

ImportError Traceback (most recent call last)
D:\Softwares\Anaconda\envs\try\lib\site-packages\numpy\core_init_.py in
21 try:
—> 22 from . import multiarray
23 except ImportError as exc:

D:\Softwares\Anaconda\envs\try\lib\site-packages\numpy\core\multiarray.py in
11
—> 12 from . import overrides
13 from . import _multiarray_umath

D:\Softwares\Anaconda\envs\try\lib\site-packages\numpy\core\overrides.py in
6
—-> 7 from numpy.core._multiarray_umath import (
8 add_docstring, implement_array_function, _get_implementing_args)

ImportError: DLL load failed while importing _multiarray_umath: 找不到指定的模块。

During handling of the above exception, another exception occurred:

ImportError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_1412/3593848235.py in
—-> 1 import numpy as np

D:\Softwares\Anaconda\envs\try\lib\site-packages\numpy_init_.py in
148 from . import _distributor_init
149
–> 150 from . import core
151 from .core import *
152 from . import compat

D:\Softwares\Anaconda\envs\try\lib\site-packages\numpy\core_init_.py in
46 “”” % (sys.version_info[0], sys.version_info[1], sys.executable,
47 version, exc)
—> 48 raise ImportError(msg)
49 finally:
50 for envkey in env_added:

ImportError:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.

We have compiled some common reasons and troubleshooting tips at:

https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

  • The Python version is: Python3.8 from “D:\Softwares\Anaconda\envs\try\python.exe”
  • The NumPy version is: “1.21.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: 找不到指定的模块

解决方法

在想用的环境下启动jupyter notebook
不要在其它环境启动再切换内核kernel


版权声明:本文为BILL_Apple原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。