Discussions>ImportError: No module named tensorflow>

ImportError: No module named tensorflow

I just installed TensorFlow with pip3 in a python virtual environment, but now I get this error when I try to import it

import tensorflow as tf
# ...
ImportError: No module named tensorflow
# modulenotfounderror no module named tensorflow

Python Version: Python3
The version of Tensorflow: Tensorflow 1.15
I don't know why I'm getting this.

3 votesLP262.00
1 Answers

You can try install tensorflow again with the specific version you want (or whatever it will install),
but put --ignore-installed flag to ignore existing tensorflow.

pip3 install tensorflow==1.13.0 --ignore-installed

Or you can uninstall tensorflow and install it with anaconda.

pip3 uninstall tensorflow
conda install tensorflow
Couldn't find what you were looking for?and we will find an expert to answer.
How helpful was this page?