I am new to TensorFlow and I received error with the third line below saying "ModuleNotFoundError: No module named 'keras'". The code is written in jupyternotebook launched from an anaconda virtual environment.
import tensorflow as tf
from tensorflow import keras
(x_train,y_train)=tf.keras.datasets.mnist.load_data()
I have no problem with importing tensorflow and the second line. I used anaconda navigator to install both tensorflow and keras. (I didn't set anaconda my default python version when installing anaconda, could that be a reason? )Thanks in advance.