简体   繁体   English

当我安装 tensorflow 时,我收到以下错误 ImportError: cannot import name '_set_madvise_hugepage' from 'numpy.core._multiarray_umath'

[英]when I installed tensorflow I get the following error ImportError: cannot import name '_set_madvise_hugepage' from 'numpy.core._multiarray_umath'

I tried to install tensorflow on anaconda powershell propmt with the following steps我尝试通过以下步骤在 anaconda powershell 提示上安装 tensorflow

conda activate tensorflow

then然后

pip install --ignore-installed --upgrade tensorflow==2.2.0

and finally最后

python -c "import tensorflow as tf;print(tf.reduce_sum(tf.random.normal([1000, 1000])))"

after that, it seems that tensorflow is installed but on a jupyter notebook when it tried to run之后,似乎 tensorflow 已安装,但在尝试运行时在 jupyter 笔记本上

import numpy as np  

and i got the following error我收到以下错误


ImportError                               Traceback (most recent call last)
<ipython-input-1-7dd3504c366f> in <module>
----> 1 import pandas as pd

~\anaconda3\lib\site-packages\pandas\__init__.py in <module>
     14 
     15 if missing_dependencies:
---> 16     raise ImportError(
     17         "Unable to import required dependencies:\n" + "\n".join(missing_dependencies)
     18     )

ImportError: Unable to import required dependencies:
numpy: 

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 "C:\Users\device name\anaconda3\python.exe"
  * The NumPy version is: "1.20.3"

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.

Original error was: cannot import name '_set_madvise_hugepage' from 'numpy.core._multiarray_umath' (C:\Users\device name\anaconda3\lib\site-packages\numpy\core\_multiarray_umath.cp38-win_amd64.pyd)

and the same thing happend when i tried to import pandas and even tensorflow当我尝试导入 pandas 甚至 tensorflow 时,同样的事情发生了

so how can i solve this issue?那么我该如何解决这个问题呢?

Please try again after upgrading your Numpy version.请升级您的 Numpy 版本后重试。 Attaching relevant threads for reference.附上相关线程以供参考。 link1 , link2 链接1链接2

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ModuleNotFoundError:matplotlib 导入时没有名为“numpy.core._multiarray_umath”的模块 - ModuleNotFoundError: No module named 'numpy.core._multiarray_umath' on matplotlib import TensorFlow - ModuleNotFoundError:没有名为“numpy.core._multiarray_umath”的模块 - TensorFlow - ModuleNotFoundError: No module named 'numpy.core._multiarray_umath' 发生异常:ImportError &quot;No module named &#39;numpy.core._multiarray_umath&#39;&quot; - Exception has occurred: ImportError "No module named 'numpy.core._multiarray_umath'" pd.read_hdf抛出“无法将此数组的WRITABLE标志设置为True”和“没有名为“ numpy.core._multiarray_umath”的模块” - pd.read_hdf throws 'cannot set WRITABLE flag to True of this array' and 'No module named 'numpy.core._multiarray_umath' ModuleNotFoundError:没有名为“numpy.core._multiarray_umath”的模块(安装 TensorFlow 时) - ModuleNotFoundError: No module named 'numpy.core._multiarray_umath' (While installing TensorFlow) kivy 中没有名为“numpy.core._multiarray_umath”的模块 - No module named 'numpy.core._multiarray_umath' in kivy Windows VS 代码找不到 numpy 模块,即使它已安装(ModuleNotFoundError: No module named 'numpy.core._multiarray_umath') - Windows VS Code can't find numpy Module even though it is installed (ModuleNotFoundError: No module named 'numpy.core._multiarray_umath') Numpy Pyinstaller 导入错误:无法导入名称多数组 - Numpy Pyinstaller ImportError: cannot import name multiarray 无法安装 numpy。 没有名为“numpy.core._multiarray_umath”的模块 - Unable to Install numpy. No module named 'numpy.core._multiarray_umath' 当使用matplotlib时,我得到`没有名为_multiarray_umath的模块 - I get `No module named _multiarray_umath` when using matplotlib
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM