ImportError: No module named tensorflow

Solution 1:

Try installing tensorflow again with the whatever version you want and with option --ignore-installed like:

pip install tensorflow==1.2.0 --ignore-installed

I solved same issue using this command.

Solution 2:

I had a more basic problem when I received this error.

The "Validate your installation" instructions say to type: python

However, I have both 2.7 and 3.6 installed. Because I used pip3 to install tensorflow, I needed to type: python3

Using the correct version, I could import the "tensorflow" module.