Deep Learning – Simple installation guide for Theano on Windows

Many tutorial videos for convolutional neural networks on youtube (e.g. https://www.youtube.com/watch?v=S75EdAcXHKk)

require the theano python library.

I spent an entire weekend figuring out how to install theano on a windows x64 machine and wanted to share the following quick installation steps:

It`s really simple if you know how! (I found that the official documentation on deeplearning.net is a bit overwhelming pointing to so many resources and alternatives. You often end up with misconfigured PATH variables or missing files or wrong compilers etc.)

The following is how it worked for me on a Windows 10 x64 Machine with Visual Studio 2015.


1) Download Anaconda for Windows x64 for Python 2.7 (Don`t use the Python 3.5 it will not work!)

https://www.continuum.io/downloads

clip_image001

2) After anaconda installation open a command prompt and execute:

conda install mingw libpython

Confirm when it asks for updates!

3) Clone the theano project to your local machine from github. (I assume you know how github works if not checkhttps://www.youtube.com/watch?v=0fKg7e37bQE)

git clone https://github.com/Theano/Theano.git

4) Open a command prompt and navigate to the theano project folder and execute:

python setup.py install

Done! This has installed theano in your global python environment.


You can test your installation by creating a test.py file with the following code line:

import theano

In a command prompt navigate to the folder containing the test.py file and execute:

python test.py


Btw. as far as I understand, further steps would be required to make theano use the GPU! The installation above would only use the CPU for calculations

Advertisements

8 Gedanken zu “Deep Learning – Simple installation guide for Theano on Windows

  1. When I try to install Theano, while trying to install scipy it throws the error „ImportError: No module named ’numpy'“

    If I try ‚conda install numpy‘ it says that it’s already installed.

    Gefällt mir

    • Yep existing installations often cause trouble. I would suggest to uninstall any python related stuff before you follow the steps in the guide. It might also help to restart the machine to set the Path Variables.

      Gefällt mir

      • just installed this on a new machine- worked fine again. the theano setup should install this folder: C:\Users\Lukas\Anaconda2\Lib\site-packages\Theano-0.8.0-py2.7.egg
        in your Anaconda2 lib. not sure what the issue might be on your end… maybe security? you should run all command prompts with elevated privilages „Run As Admin“ to avoid access issues.

        Gefällt mir

      • I now tried installing anaconda to the user directory instead of to C:\Anaconda (that sort of thing is supposed to make a difference sometimes on windows) but that didn’t help.
        It tells me that the theano installation went right and the theano.egg is there, but then it can’t find it when I try to import it.

        Gefällt mir

Kommentar verfassen

Trage deine Daten unten ein oder klicke ein Icon um dich einzuloggen:

WordPress.com-Logo

Du kommentierst mit Deinem WordPress.com-Konto. Abmelden / Ändern )

Twitter-Bild

Du kommentierst mit Deinem Twitter-Konto. Abmelden / Ändern )

Facebook-Foto

Du kommentierst mit Deinem Facebook-Konto. Abmelden / Ändern )

Google+ Foto

Du kommentierst mit Deinem Google+-Konto. Abmelden / Ändern )

Verbinde mit %s