I tried to import keras to my ANN model but I found this Module not found the type of error. I tried tp import from tensorflow.keras but still it's the same problem. 
No module named 'keras'
I tried to import keras to my ANN model but I found this Module not found the type of error. I tried tp import from tensorflow.keras but still it's the same problem. 
No module named 'keras'
Try importing keras first. Try:
from numpy import loadtxt
import keras
from keras.models import Sequential
from keras.layers import Dense
If this doesn't work, try using TensorFlow: pip install tensorflow and:
from tensorflow.keras import Sequential
I think this problem is related to the environment. Your TensorFlow module may be installed in a different env. and Keras is in a different env. So, try to uninstall the Keras module and reinstall it.
$ pip uninstall keras
$ pip install keras
If this doesn't work, try using TensorFlow: pip install tensorflow and:
from tensorflow.keras import Sequential