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

ImportError: No module named keras.models #1

Open
Handymanalan opened this issue Jul 24, 2019 · 3 comments
Open

ImportError: No module named keras.models #1

Handymanalan opened this issue Jul 24, 2019 · 3 comments

Comments

@Handymanalan
Copy link

Hi,

I have installed all dependencies through python pip install, but I still got this error:

ImportError: No module named keras.models

I have Keras==2.2.4 installed. Is it due to the script indicate keras but not Keras? If so, how could I change the script?

Cheers

Alan

@zhenchengfang
Copy link
Owner

Hi,

Thank you for your interest in PPR-Meta. I think this problem may be caused by the version of the keras. PPR-Meta is trained using version 2.0.8. In my experience, the different versions of keras or tensorflow are sometimes incompatible. I think you can execute the command “import keras” and “from keras.models import Sequential” in python interface, respectively. If there is no error when executing “import keras”, the keras package has been installed successfully and this problem is likely caused by the keras verion. You can also choose to run PPR-Meta in the virtual machine following the video guide, this will be much easier.

@Handymanalan
Copy link
Author

Thanks.

Strange that when I check with pip freeze, I got Keras==2.2.4 in the HPC. But upon the command line "import keras" in the python interface, I got this error:
ImportError: No module name keras

I will use the virtual machine. I will see if I can install it in my institute's HPC.

Cheers

Alan

@zhenchengfang
Copy link
Owner

If there is an error when executing “import keras”, the keras package may have not been installed successfully. I think this may be the PATH issue or you can consider install keras and tensorflow using Anaconda. Of course, using virtual machine is a good choice.

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

2 participants