【发布时间】:2019-03-05 19:51:03
【问题描述】:
今天我决定更新我的 Anaconda 发行版。但更新后,当我尝试在终端或 VScode 中导入 numpy 时,我收到以下错误消息(我只是引用了最后几行)
import numpy
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 module could not be found.
但是,在 Jupyter notebook 中导入 numpy 是完全可以的。我想知道我的问题的根源是什么以及如何解决这个问题。提前致谢!
【问题讨论】:
-
“我决定更新我的 Anaconda 发行版”到底是什么意思?
-
你是否安装了多个python?
-
听起来您要么像@busybear 所说的那样使用不同的python 安装,要么使用具有不同版本numpy 的虚拟环境
-
奇怪的是我实际上只有一个版本的python,并且我确保将其余所有版本都删除。我认为证明它的方法是在终端中输入“where python”并在笔记本中运行 sys.executable,它们指向同一个 python.exe 文件。
-
终端和笔记本中的
sys.path是什么?他们可能正在寻找不同版本的 numpy。
标签: python numpy anaconda jupyter-notebook