ModuleNotFoundError No module named keras

+1 vote

Hi Guys,

I installed keras module in my system. But when I tried to import this module I got this below error.

$ from keras.models import Sequential
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-7-9c5e0a19b646> in <module>
----> 1 from keras.models import Sequential
ModuleNotFoundError: No module named 'keras'
Apr 23, 2020 in Machine Learning by akhtar
• 38,240 points
31,149 views

1 answer to this question.

+2 votes
Best answer

Hi@akhtar,

I think this problem is related to the environment. Your TensorFlow module may be installed in a different env. and Keras is in a different env. So, try to uninstall the Keras module and reinstall it.

$ pip uninstall keras
$ pip install keras

Hope this will solve your error.

Build a career in Artificial Intelligence with our Post Graduate Diploma in AI and Machine Learning courses.

answered Apr 23, 2020 by MD
• 95,340 points

edited Aug 11, 2021 by Soumya

Related Questions In Machine Learning

0 votes
1 answer

ModuleNotFoundError: No module named 'cPickle'

Hi@akhtar, There is no cPickle module in Python 3. ...READ MORE

answered Jul 14, 2020 in Machine Learning by MD
• 95,340 points
5,604 views
0 votes
1 answer

ImportError: No module named 'tensorflow.contrib.rnn.python.ops.core_rnn

Hi@akhtar, I think you got this error because of incompatible ...READ MORE

answered Apr 22, 2020 in Machine Learning by MD
• 95,340 points
8,899 views
0 votes
1 answer

ImportError: No module named seaborn

Hi@akhtar, By default it comes with Anaconda but ...READ MORE

answered Apr 28, 2020 in Machine Learning by MD
• 95,340 points
2,803 views
0 votes
1 answer

ImportError: No module named imgaug

Hi@akhtar, You need to install the imgaug module ...READ MORE

answered Jul 13, 2020 in Machine Learning by MD
• 95,340 points
976 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 2,760 views
0 votes
1 answer
0 votes
1 answer
0 votes
2 answers

ModuleNotFoundError: No module named 'tensorflow'

If you are using Anaconda, go to ...READ MORE

answered Nov 17, 2020 in Machine Learning by Vignesh

edited Aug 11, 2021 by Soumya 15,369 views
+1 vote
1 answer

ModuleNotFoundError: No module named 'mnist'

Hi@akhtar, This mnist package comes with keras module ...READ MORE

answered May 9, 2020 in Machine Learning by MD
• 95,340 points
4,764 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP