otherwise, you'll have to pip install it:
try:
import keras
except ModuleNotFoundError:
!pip install keras==2.2.4
import keras
print(keras.__version__)
But you have to make sure you use a version of keras compatible with the current tensorflow. Otherwise, pip install tf as well.
------------------------------
Philippe Gregoire
IBM France - TSP & ISV Technical Enablement - Data&AI, IoT Europe
NICE, France
------------------------------
Original Message:
Sent: Fri October 30, 2020 07:47 AM
From: Michael Mitchell
Subject: how do you add python libraries to notebook runtime?
---------------------------------------------------------------------------ModuleNotFoundError Traceback (most recent call last)<ipython-input-2-5178c9f2d38f> in <module>----> 1 from keras.preprocessing.image import ImageDataGeneratorModuleNotFoundError: No module named 'keras'
------------------------------
Michael Mitchell
------------------------------
#WatsonStudio