It is my solution for the same problem
- Install TDM GCC x64.
- Install Anaconda x64.
- Open the Anaconda prompt
- Run
conda update conda - Run
conda update --all - Run
conda install mingw libpython - Install the latest version of Theano,
pip install git+git://github.com/Theano/Theano.git - Run
pip install git+git://github.com/fchollet/keras.git