I am trying to download Keras to my notebook instance on AWS SageMaker. The code and the errors or warnings are listed below:
from keras.models import Sequential #Sequential Models
from keras.layers import Dense #Dense Fully Connected Layer Type
from keras.optimizers import SGD #Stochastic Gradient Descent Optimizer
from keras.callbacks import EarlyStopping
from keras.wrappers.scikit_learn import KerasClassifier
Error:
ModuleNotFoundError: No module named 'tensorflow'
Then I tried to download Tensorflow:
!pip install tensorflow
Installation is completed with the following note:
Installing collected packages: wrapt, tensorflow
Found existing installation: wrapt 1.10.11
Cannot uninstall 'wrapt'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
You are using pip version 10.0.1, however version 19.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Then I try to uninstall wrapt but still having the same issue. Did anyone have the same issue? And is this SageMaker related issue? I also tried to run the below line but didn't change:
from sagemaker.tensorflow import TensorFlow
Try this:
!pip install tensorflow -t ./
it will install tensorflow in your current directory
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With