Installing Theano with Anaconda Python (Win)

Before we start, Yes I know this is not the official image for “Theano: A CPU and GPU Math Expression Compiler”, but they didn’t have a cool logo, in fact they don’t have a logo at all.

The Problem

I am sure I read somewhere that Anaconda Python (Download) comes with Theano. But I might be mistaken, all I know it wasnt a quick install when I wanted to use it and I was continuously getting this error which suggested it wasn’t installed…

—————————————————————————
ImportError Traceback (most recent call last)
<ipython-input-3-de45f36b45a8> in <module>()
—-> 1 from theano import *

ImportError: No module named theano

Well here is how I fixed it.

NOTE: I am using Windows 8 64bit, Python 2.7.10 | Anaconda 2.4.0 (64-bit)

The Fix

  1. Installed the Anaconda Python distribution, make sure you dont have several versions installed.
  2. Install the prerequisites for Theano and Anaconda, just open up command prompt and run ‘conda install mingw libpython‘.
  3. Download the latest version of Theano (here) and extract somewhere.
  4. In command prompt navigate to the folder where you extracted Theano too and run ‘python setup.py develop”
  5. Restarted your python terminal/instance and try to re-import Theano by ‘from theano import *’
  6. Enjoy using Theano

You might need to do some extra things, here is the official link.

EDIT: I had to install Theano on a different Windows PC and didn’t have to do steps 3 and 4.