I was running Jupyter Notebook and the following error occurs
ModuleNotFoundError
Traceback (most recent call last) in ---->from keras.models import Sequential
from keras.layers import (
Conv2D, MaxPooling2D, Flatten, Dense, Dropout)ModuleNotFoundError: No module named 'keras'
I have tried using
import sys; sys.path
and found this
['/home/xxx/notebook',
'/home/xxx/anaconda3/lib/python37.zip',
'/home/xxx/anaconda3/lib/python3.7',
'/home/xxx/anaconda3/lib/python3.7/lib-dynload',
'',
'/home/xxx/anaconda3/lib/python3.7/site-packages',
'/home/xxx/anaconda3/lib/python3.7/site-packages/IPython/extensions',
'/home/xxx/.ipython']
Is there any problem with the installation? Do I need to reinstall everything from python to anaconda. Would some be able to point me to a proper installation of anaconda
BTW, if u have installed python, should you install python package through anaconda again
Thanks
You have to install all the dependencies first before using it. Try using
by installing it with conda command it manage your versions compatibility with other libraries.
with pip install libraries will only install in your current environment and the latest version of the library sometimes latest libraries are not compatible with the other libraries so we have to take care of version compatibility.
keras is actually part of tensorflow so all you have to do is just
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense,Dropout,Activation, Flatten, Conv2D, MaxPooling2D
cheers mate
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With