ImportError: No module named ‘keras’

So basically, I am fairly new to programming and using python. I am trying to build an ANN model for which I have to use Tensor flow, Theano and Keras library. I have Anaconda 4.4.1 with Python 3.5.2 on Windows 10 x64 and I have installed these libraries by following method.

  1. Create a new environment with Anaconda and Python 3.5: conda create -n tensorflow python=3.5 anaconda
  2. Activate the environment: activate tensorflow
  3. After this you can install Theano, TensorFlow and Keras: conda install theano, conda install mingw libpython, pip install tensorflow, pip install keras,
  4. Update the packages: conda update –all

All these packages are installed correctly and I have check them with conda list. However, when I am trying to import any of these 3 libraries (i.e. Tensor flow, Theano and Keras), it is giving me the following error:

Traceback (most recent call last):
File "<ipython-input-3-c74e2bd4ca71>", line 1, in <module>
import keras
ImportError: No module named 'keras'

Leave a Comment