Python 安装tensorflow时,出现以下错误ImportError:无法导入名称'_设置"madvise"hugepage';从';numpy.core._multiarray_umath';

Python 安装tensorflow时,出现以下错误ImportError:无法导入名称'_设置"madvise"hugepage';从';numpy.core._multiarray_umath';,python,pandas,numpy,tensorflow,Python,Pandas,Numpy,Tensorflow,我尝试通过以下步骤在anaconda powershell propmt上安装tensorflow conda activate tensorflow 然后 最后 python -c "import tensorflow as tf;print(tf.reduce_sum(tf.random.normal([1000, 1000])))" 在那之后,tensorflow似乎已经安装了,但当它试图运行时,它被安装在了jupyter笔记本上 import numpy as

我尝试通过以下步骤在anaconda powershell propmt上安装tensorflow

conda activate tensorflow

然后

最后

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

在那之后,tensorflow似乎已经安装了,但当它试图运行时,它被安装在了jupyter笔记本上

import numpy as np  
我得到了下面的错误


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)

ImportError回溯(最近一次呼叫最后一次)
在里面
---->1进口熊猫作为pd
~\anaconda3\lib\site packages\pandas\\uuuuuu init\uuuuuuuuuuuu.py in
14
15如果缺少_依赖项:
--->16.引起恐怖(
17“无法导入所需的依赖项:\n”+“\n”。加入(缺少依赖项)
18     )
ImportError:无法导入所需的依赖项:
努比:
重要提示:请阅读本文,了解如何解决此问题的建议!
导入numpy C扩展失败。此错误可能发生在以下情况:
原因很多,通常是由于您的设置或NumPy的使用方式问题
安装。
我们在以下网站上汇编了一些常见原因和故障排除提示:
https://numpy.org/devdocs/user/troubleshooting-importerror.html
请注意并检查以下内容:
*Python版本是:Python3.8,来自“C:\Users\device name\anaconda3\Python.exe”
*NumPy版本是:“1.20.3”
并确保它们是您期望的版本。
请仔细阅读上面链接的文档以获得进一步帮助。
原始错误是:无法从“numpy.core.\u multiarray\u umath”(C:\Users\device name\anaconda3\lib\site packages\numpy\core\\u multiarray\u umath.cp38-win\u amd64.pyd)导入名称“\u set\u madvise\u hugepage”)
当我试图进口熊猫甚至tensorflow时,同样的事情也发生了

那么我该如何解决这个问题呢


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)