Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Import keras.datasets not working

I have keras installed on my linux machine, but when I try to import a dataset from the keras.datasets I get an error that it cannot find it.

So for example:

from keras.datasets import mnist

I get the error

ImportError: No module named keras.datasets

I installed keras using pip install and it installed successfully.

like image 668
patapouf_ai Avatar asked Feb 16 '16 11:02

patapouf_ai


1 Answers

Do you have keras.py or keras.pyc in the current working directory? If so, this will mess up the imports. Try renaming the file and/or deleting keras.pyc.

like image 197
Justin Shenk Avatar answered Sep 24 '22 00:09

Justin Shenk