ModuleNotFoundError Traceback (most recent call last) <ipython-input-1-127f629c91ba> in <module> ----> 1 import tensorflow as tf 2 from tensorflow import keras 3 import numpy as np ModuleNotFoundError: No module named 'tensorflow' code example

Example 1: ImportError: No module named tensorflow

pip install tensorflow==1.2.0 --ignore-installed

Example 2: why tensorflow not working in .py file

##don't execute your file as 
sudo python3 <yourfile.py>

##just use 
python3 <yourfile.py>

## and also *don't* use file names like "imp.py", "tf.py",