Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No module named 'keras' #12

Open
Emix26 opened this issue Apr 27, 2017 · 6 comments
Open

No module named 'keras' #12

Emix26 opened this issue Apr 27, 2017 · 6 comments

Comments

@Emix26
Copy link
Contributor

Emix26 commented Apr 27, 2017

Hi,
Does keras come together with the installation of Anaconda or you're supposed to install it separately ?

@betatim
Copy link
Member

betatim commented Apr 27, 2017

You need to install it, either conda install keras and if that doesn't work on your platform try pip install keras. If that doesn't work either we need more details from your system and setup.

@Emix26
Copy link
Contributor Author

Emix26 commented Apr 27, 2017

Ah yes, it works. Thanks ! I installed it with "conda install keras"

@VINX89
Copy link

VINX89 commented May 1, 2017

Hi.
After installing keras and running the notebook, I get the following:

Error importing tensorflow. Unless you are using bazel,
you should not try to import tensorflow from its source directory;
please exit the tensorflow source tree, and relaunch your python interpreter
from there.

I tried to uninstall and reinstall protobuf as suggested in some thread, but it didn't fix the issue...

@betatim
Copy link
Member

betatim commented May 1, 2017

Off the top of my head I don't have a good idea. From the error message it sounds like you installed tensorflow from source?

What operating system do you have and how did you try to install keras and tensorflow?

@VINX89
Copy link

VINX89 commented May 1, 2017

I managed to fix the problem by changing 'tensorflow' with 'theano'.
In particular, I set "backend": "theano" in my .keras/keras.json file.

@betatim
Copy link
Member

betatim commented May 1, 2017

Good to hear it works. There should be no difference between using the theano or tensorflow backend. There are a few edge cases where it could go wrong but these should be mostly in cases where you start using other people's code that contains something fine tuned to their particular backend. In particular tf and theano order the indices differently for images.

More notes: https://keras.io/backend/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants