简体   繁体   English

ModuleNotFoundError:在 Windows 10 x64、Anaconda 和 spyder 4.0.1 和 python 37 上没有名为“tensorflow”的模块。

[英]ModuleNotFoundError : No module named 'tensorflow' on Windows 10 x64, Anaconda with spyder 4.0.1 and python 3.7

Solutions tried:尝试的解决方案:

pip install tensorflow pip 安装 tensorflow

pip show tensorflow --ignore_installed pip 显示 tensorflow --ignore_installed

pip install tensorflow==2.0.0-rc0 pip 安装tensorflow==2.0.0-rc0

conda install -c conda-forge tensorflow conda install -c conda-forge tensorflow

conda install tensorflow康达安装 tensorflow

pip3 show tensorflow pip3 显示 tensorflow

pip show tensorflow Note: you may need to restart the kernel to use updated packages. pip show tensorflow 注意:您可能需要重新启动 kernel 才能使用更新的软件包。 WARNING: Package(s) not found: tensorflow Tried restarting kernel.警告:找不到包:tensorflow 尝试重新启动 kernel。 Tried restarting laptop尝试重新启动笔记本电脑

Code trying to run: from keras.models import load_model尝试运行的代码: from keras.models import load_model

Error: runcell(0, 'C:/Users/chinm/untitled1.py') Traceback (most recent call last):错误: runcell(0, 'C:/Users/chinm/untitled1.py') Traceback(最近一次调用最后):

File "C:\Users\chinm\anaconda3\lib\site-packages\keras_ init _.py", line 3, in from tensorflow.keras.layers.experimental.preprocessing import RandomRotation文件“C:\Users\chinm\anaconda3\lib\site-packages\keras_init _.py ”,第 3 行,从 tensorflow.keras.layers.experimental.preprocessing 导入 RandomRotation

ModuleNotFoundError: No module named 'tensorflow' ModuleNotFoundError:没有名为“tensorflow”的模块

During handling of the above exception, another exception occurred:在处理上述异常的过程中,又出现了一个异常:

Traceback (most recent call last):回溯(最近一次通话最后):

File "C:\Users\chinm\untitled1.py", line 14, in from keras.models import load_model文件“C:\Users\chinm\untitled1.py”,第 14 行,从 keras.models 导入 load_model

File "C:\Users\chinm\anaconda3\lib\site-packages\keras_ init _.py", line 6, in 'Keras requires TensorFlow 2.2 or higher.文件“C:\Users\chinm\anaconda3\lib\site-packages\keras_init _.py ”,第 6 行,在 'Keras 需要 TensorFlow 2.2 或更高版本。 ' '

ImportError: Keras requires TensorFlow 2.2 or higher. ImportError:Keras 需要 TensorFlow 2.2 或更高版本。 Install TensorFlow via pip install tensorflow通过pip install tensorflow

I can't see your code, but it appears your key error is Keras requires TensorFlow 2.2 , while you installed pip install tensorflow==2.0.0-rc0 .我看不到您的代码,但您的关键错误似乎是Keras requires TensorFlow 2.2 ,而您安装了pip install tensorflow==2.0.0-rc0 2.0 < 2.2. 2.0 < 2.2。 Have you tried installing tensorflow 2.2 or up, or upgrading your existing version?您是否尝试过安装 tensorflow 2.2 或更高版本,或者升级您现有的版本?

https://www.tensorflow.org/install/pip recommends: https://www.tensorflow.org/install/pip建议:

pip install --upgrade tensorflow

with

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

to verify the installation.验证安装。

暂无
暂无

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

相关问题 在 Anaconda (Windows x64) 中为 Python 3.8 安装 Tensorflow 2.2 - Install Tensorflow 2.2 for Python 3.8 in Anaconda (Windows x64) ModuleNotFoundError:没有名为“tensorflow.python”的模块 Anaconda - ModuleNotFoundError: No module named 'tensorflow.python' Anaconda ModuleNotFoundError:在蟒蛇python 3.6.3中没有名为&#39;tensorflow&#39;的模块 - ModuleNotFoundError: No module named ‘tensorflow’ in anaconda python 3.6.3 在 macOS 上使用 Anaconda 将 Spyder 升级到 4.0.1 后出错:ModuleNotFoundError: No module named &#39;numpy&#39; - Error after upgrading Spyder to 4.0.1 with Anaconda on macOS: ModuleNotFoundError: No module named 'numpy' Anaconda:ModuleNotFoundError:没有名为“tensorflow”的模块 - Anaconda : ModuleNotFoundError: No module named 'tensorflow' ModuleNotFoundError:anaconda 中没有名为“tensorflow”的模块 - ModuleNotFoundError: No module named 'tensorflow' in anaconda ModuleNotFoundError:anaconda spyder 中没有名为“pyLDAvis”的模块 - ModuleNotFoundError: No module named 'pyLDAvis' in anaconda spyder 在 Windows 10 上使用 Python 3.7 时出现“ModuleNotFoundError: No module named &#39;pysqlcipher3&#39;”错误 - "ModuleNotFoundError: No module named 'pysqlcipher3'" error while using Python 3.7 on windows 10 Tensorflow 和 Anaconda 的 ModuleNotFoundError (Windows 10) - ModuleNotFoundError for Tensorflow and Anaconda (Windows 10) Python-TensorFlow-ModuleNotFoundError:没有名为x的模块 - Python - TensorFlow - ModuleNotFoundError: No module named x
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM