[英]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?那么我该如何解决这个问题呢?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.