Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I install Keras and Theano in Anaconda Python on Windows?

I am trying to work on neural networks in Python using the following Keras packages:

from keras.utils import np_utils from keras.layers.core import Dense, Activation, Dropout from keras.models import Sequential from keras.layers.core import Dense, Dropout, Activation, Flatten from keras.layers.convolutional import Convolution2D, MaxPooling2D from keras.optimizers import SGD 

But, I am getting the following error:

 15 import theano  ---> 16 from theano import gof  17 from theano.compat.python2x import partial  18 import theano.compile.mode  ImportError: cannot import name gof 

Installing installed conda install keras. Later I tried to use pip install Theano, but it did not work. I Tried to install using pip install git, but I am getting this error: cannot find command git. So I installed Git and I set the environment variables.

So, is there any procedure to install these packages?

like image 990
pavikirthi Avatar asked Dec 04 '15 21:12

pavikirthi


People also ask

How install Theano on Windows?

Developer Installation Install the developer version of Theano with: git clone git://github.com/Theano/Theano.git cd Theano <sudo> pip install <--user> <--no-deps> -e .


1 Answers

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
like image 153
Yelaman Avatar answered Oct 21 '22 07:10

Yelaman