[Solved]: ModuleNotFoundError: No module named 'keras' on anaconda / jupyter notebook / spyder
uninstall Keras if installed then Again install using conda
$ pip uninstall KerasUninstalling Keras-2.2.4: Would remove: /Users/admin/rahul/lib/python3.6/site-packages/Keras-2.2.4.dist-info/* /Users/admin/rahul/lib/python3.6/site-packages/docs/* /Users/admin/rahul/lib/python3.6/site-packages/keras/*Proceed (y/n)? y Successfully uninstalled Keras-2.2.4
install using conda:
$ sudo conda install keras
Stack Trace
Stack Trace
$ sudo conda install kerasSolving environment: done## Package Plan ## environment location: /Users/admin/anaconda3 added / updated specs: - kerasThe following packages will be downloaded: package | build ---------------------------|----------------- protobuf-3.6.1 | py36h0a44026_0 608 KB keras-applications-1.0.6 | py36_0 49 KB libprotobuf-3.6.1 | hd9629dc_0 3.8 MB tensorflow-base-1.12.0 |mkl_py36h70e0e9a_0 85.6 MB keras-preprocessing-1.0.5 | py36_0 52 KB termcolor-1.1.0 | py36_1 7 KB absl-py-0.6.1 | py36_0 152 KB grpcio-1.16.1 | py36h044775b_1 944 KB tensorflow-1.12.0 |mkl_py36h2b2bbaf_0 4 KB c-ares-1.15.0 | h1de35cc_1 81 KB keras-2.2.4 | 0 5 KB gast-0.2.0 | py36_0 15 KB _tflow_select-2.3.0 | mkl 3 KB keras-base-2.2.4 | py36_0 457 KB markdown-3.0.1 | py36_0 107 KB astor-0.7.1 | py36_0 43 KB tensorboard-1.12.1 | py36hdc36e2c_0 3.1 MB ------------------------------------------------------------ Total: 95.0 MBThe following NEW packages will be INSTALLED: _tflow_select: 2.3.0-mkl absl-py: 0.6.1-py36_0 astor: 0.7.1-py36_0 c-ares: 1.15.0-h1de35cc_1 gast: 0.2.0-py36_0 grpcio: 1.16.1-py36h044775b_1 keras: 2.2.4-0 keras-applications: 1.0.6-py36_0 keras-base: 2.2.4-py36_0 keras-preprocessing: 1.0.5-py36_0 libprotobuf: 3.6.1-hd9629dc_0 markdown: 3.0.1-py36_0 protobuf: 3.6.1-py36h0a44026_0 tensorboard: 1.12.1-py36hdc36e2c_0 tensorflow: 1.12.0-mkl_py36h2b2bbaf_0 tensorflow-base: 1.12.0-mkl_py36h70e0e9a_0 termcolor: 1.1.0-py36_1 Proceed ([y]/n)? yDownloading and Extracting Packagesprotobuf-3.6.1 | 608 KB | ########################################################################################################################################## | 100% keras-applications-1 | 49 KB | ########################################################################################################################################## | 100% libprotobuf-3.6.1 | 3.8 MB | ########################################################################################################################################## | 100% tensorflow-base-1.12 | 85.6 MB | ########################################################################################################################################## | 100% keras-preprocessing- | 52 KB | ########################################################################################################################################## | 100% termcolor-1.1.0 | 7 KB | ########################################################################################################################################## | 100% absl-py-0.6.1 | 152 KB | ########################################################################################################################################## | 100% grpcio-1.16.1 | 944 KB | ########################################################################################################################################## | 100% tensorflow-1.12.0 | 4 KB | ########################################################################################################################################## | 100% c-ares-1.15.0 | 81 KB | ########################################################################################################################################## | 100% keras-2.2.4 | 5 KB | ########################################################################################################################################## | 100% gast-0.2.0 | 15 KB | ########################################################################################################################################## | 100% _tflow_select-2.3.0 | 3 KB | ########################################################################################################################################## | 100% keras-base-2.2.4 | 457 KB | ########################################################################################################################################## | 100% markdown-3.0.1 | 107 KB | ########################################################################################################################################## | 100% astor-0.7.1 | 43 KB | ########################################################################################################################################## | 100% tensorboard-1.12.1 | 3.1 MB | ########################################################################################################################################## | 100% Preparing transaction: doneVerifying transaction: doneExecuting transaction: done