gpt4 book ai didi

python-3.x - 导入tensorflow时出现以下错误: No module named 'numpy.core._multiarray_umath'

转载 作者:行者123 更新时间:2023-12-02 22:28:04 26 4
gpt4 key购买 nike

我已经安装了 Ancaconda3 和 Tensorflow。当我尝试在 python shell 中导入 Tensorflow 时,收到以下错误:

ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'ImportError: numpy.core.multiarray failed to import

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "", line 980, in _find_and_load SystemError:<class '_frozen_importlib._ModuleLockManager'> returned a result withan error set ImportError: numpy.core._multiarray_umath failed toimport ImportError: numpy.core.umath failed to import

我不确定问题是什么,因为我的系统上安装了 numpy 并且可以在 python 中成功导入。我使用的是 Windows10。

最佳答案

我也遇到了同样的问题。当我将 numpy 从 1.15.4 升级到 1.16.1 后,它就得到了解决。

如果您使用的是点:pip install numpy --upgrade

Anaconda3 附带的 Numpy 版本为 1.15.4。所以我升级了并且它起作用了。

<小时/>

旁注:如果您还在脚本中使用 scikit-image,请注意 numpy 1.16.3 与旧版本的 scikit-image 存在冲突(例如,您可能会得到 导入错误:无法导入名称“_validate_lengths”)。在这种情况下,来自终端的 pip install --upgrade scikit-image 为我解决了这个问题。

关于python-3.x - 导入tensorflow时出现以下错误: No module named 'numpy.core._multiarray_umath' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54665842/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com