Keras: Importerror: No Module Named Data_utils
Solution 1:
Even though this answer is correct but is not complete. Thanks to Ben J.'s answer but Tadhg McDonald-Jensen is the first one offering me the answers here.
Summarize it
I was using pip install keras
to install keras
, but it did not install the latest version of keras
according to this. That is why I could do things like from keras.models import Sequential
, from keras.layers.core import Dense, Activation, Dropout
, and from keras.layers.recurrent import LSTM
but not from keras.utils.data_utils import get_file
. Because it is not in the previous versions.
SO, just clone
the keras
from their github, cd
into it, and run sudo python setup.py install
will solve this problem.
REMEMBER, if you already did this pip install keras
, you have to make sure clear all keras
versions you have installed by doing this pip uninstall keras
many time until no keras
existing, then do this sudo python setup.py install
.
Solution 2:
I looked at the tar.gz from https://pypi.python.org/pypi/Keras/0.1.3 and there is no file named data_utils.py in the utils folder. However the github does include this file: https://github.com/fchollet/keras.
Solution 3:
I hope your issue is resolved by now, if not:
sudo pip install git+git://github.com/fchollet/keras.git --upgrade
should do the job for you.
Solution 4:
this might solve your problem.
sudo -H pip3 install git+https://github.com/fchollet/keras.git --upgrade
Post a Comment for "Keras: Importerror: No Module Named Data_utils"