[英]How can I resolve ModuleNotFoundError: No module named 'tensorflow' problem?
Tensorflow is successfully installed on my laptop. Tensorflow 已成功安装在我的笔记本电脑上。
Name: tensorflow
Version: 2.2.0
Summary: TensorFlow is an open source machine learning framework for everyone.
Home-page: https://www.tensorflow.org/
Author: Google Inc.
Author-email: packages@tensorflow.org
License: Apache 2.0
Location: c:\users\my name\anaconda3\lib\site-packages
Requires: protobuf, astunparse, h5py, opt-einsum, wrapt, grpcio, termcolor, gast, tensorflow-estimator, scipy, six, tensorboard, wheel, google-pasta, numpy, keras-preprocessing, absl-py
Required-by:
The environment is Windows 8.1, python 3.7.1, pip 20.1.1.环境为 Windows 8.1、python 3.7.1、pip 20.1.1。
When I run this test file当我运行这个测试文件
import tensorflow as tf
hello = tf.constant("hello TensorFlow!")
sess=tf.Session()
print(sess.run(hello))
, I get the following error message: ,我收到以下错误消息:
ModuleNotFoundError: No module named 'tensorflow'.
How can I resolve this problem?我该如何解决这个问题?
Just install it with pip:只需使用 pip 安装即可:
pip install tensorflow
Check this page: https://pypi.org/project/tensorflow/检查此页面: https://pypi.org/project/tensorflow/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.