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 #4889

Closed
MrWanter opened this Issue Jan 1, 2017 · 8 comments

Comments

Projects
None yet
7 participants
@MrWanter

MrWanter commented Jan 1, 2017

I have installed Anaconda package on a server as a user account, then I use conda install keras to install keras on it, but then when I run import keras, it raised no module named keras, anyone can help? thanks very much!

@nzw0301

This comment has been minimized.

Contributor

nzw0301 commented Jan 1, 2017

Did your command (: conda install keras) succeed?

keras cannot be installed by conda install keras because package not found.
(my anaconda is anaconda3-4.1.1)

I recommend use pip install keras to install keras.

@raul-jr3

This comment has been minimized.

raul-jr3 commented Apr 23, 2017

I had the same issue when i installed keras using conda

I removed it and then installed using sudo pip3 install keras and it worked.

@stale stale bot added the stale label Jul 22, 2017

@stale

This comment has been minimized.

stale bot commented Jul 22, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 30 days if no further activity occurs, but feel free to re-open a closed issue if needed.

@recs84

This comment has been minimized.

recs84 commented Aug 7, 2017

sudo pip3 install keras fixed it, thanks!

@stale stale bot removed the stale label Aug 7, 2017

@stale

This comment has been minimized.

stale bot commented Nov 5, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 30 days if no further activity occurs, but feel free to re-open a closed issue if needed.

@stale stale bot added the stale label Nov 5, 2017

@stale stale bot closed this Dec 5, 2017

@annanurov

This comment has been minimized.

annanurov commented Apr 16, 2018

I had the a similar problem. Following steps helped

1- Open Anaconda Prompt with admin privileges (in windows: right click -> open as admin, etc)
2- Type the command to install you package, e.g.:
conda install -c conda-forge keras tensorflow
If not sure about package name, search web for it.

3- Test if the package was installed correctly. E.g. launch Spider from Anaconda and use command
import keras

4- Restart Rstudio (Session -> Restart R) before trying
library(keras)

PS: now you have to deal with TF's internal errors and warnings like
Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX
But, that's a whole different story.

@Muthuramansivakumar

This comment has been minimized.

Muthuramansivakumar commented Aug 6, 2018

If you are using Anaconda 3.6 version, you can type the below command in Anaconda prompt to install keras

conda install -c conda-forge keras

Followed by try importing Dense and sequential libraries from the keras package

from keras.layers import Dense
from keras.models import Sequential

Hope it works

Thanks

@MayankMurali

This comment has been minimized.

MayankMurali commented Sep 18, 2018

I had the a similar problem. Following steps helped

1- Open Anaconda Prompt with admin privileges (in windows: right click -> open as admin, etc)
2- Type the command to install you package, e.g.:
conda install -c conda-forge keras tensorflow
If not sure about package name, search web for it.

3- Test if the package was installed correctly. E.g. launch Spider from Anaconda and use command
import keras

4- Restart Rstudio (Session -> Restart R) before trying
library(keras)

PS: now you have to deal with TF's internal errors and warnings like
Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX
But, that's a whole different story.

Thanks a lot mate for the detailed steps :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment