Deep Learning – Simple installation guide for Theano on Windows


Many tutorial videos for convolutional neural networks on youtube (e.g.

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 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!)


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 check

git clone

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

python install

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

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

import theano

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



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.

Comments (15)

  1. Jake says:

    Worked so easily for me after struggling wilth all previous attempts, thanks!

  2. Jens says:

    Thanks a lot! I tried installing g++ both via cygwin and some TDM-something thing, both wouldn’t work, throwing cryptic error messages. This finally does!

  3. Michael says:

    Thank you very much , I’ve been searching and trying for about 6 hours till I found this guide , it was extremely useful.

    1. LukasSteindl says:

      happy to help! i also published a blogpost on how to activate the GPU for theano here:

  4. Seeven Amic says:

    Hello Lukas, Please tell me whether there is a way to install Theano to work on Python 3.5? Thanks.

    1. LukasSteindl says:

      Unfortunately there is no way to make it run on 3.5 atm.

      1. Seeven Amic says:

        Thanks anyway.

      2. Leong says:

        winPython comes with Theano already installed. Current version uses python 3.

        1. Berryme says:

          theano supports py3.4, not 3.5

  5. John says:

    Thanks so much! I went to 5 or 6 places before I found this.

  6. Tushar says:

    Thanks so much for clear & simple guidelines to install Theano. I’ve gone through 4-5 sites & spending countless hours to figure this out but none of them worked.
    With your help I was able to do it so quickly, wish I had came across this earlier
    Just one query – how do I make it to work with Python 3.x?

  7. gary says:

    i want to kown how to uninstall it

    1. LukasSteindl says:

      just uninstall your anaconda pyhton environment under control panel/ add remove programs would be an option

  8. Smache says:

    Thank you very much for your post, I try to do the same steps: But i find this problem while testing thr file; I would e very grateful if you could help me please:

    Problem occurred during compilation with the command line below:
    “g++” -shared -g -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -m64 -DMS_WIN64 -I”C:\Users\msmache\WinPython-64bit-\python-2.7.6.amd64\lib\site-packages\numpy\core\include” -I”C:\Users\msmache\WinPython-64bit-\python-2.7.6.amd64\include” -I”C:\Users\msmache\WinPython-64bit-\python-2.7.6.amd64\lib\site-packages\theano-0.9.0dev4-py2.7.egg\theano\gof” -L”C:\Users\msmache\WinPython-64bit-\python-2.7.6.amd64\libs” -L”C:\Users\msmache\WinPython-64bit-\python-2.7.6.amd64″ -o C:\Users\msmache\AppData\Local\Theano\compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_69_Stepping_1_GenuineIntel-2.7.6-64\lazylinker_ext\lazylinker_ext.pyd C:\Users\msmache\AppData\Local\Theano\compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_69_Stepping_1_GenuineIntel-2.7.6-64\lazylinker_ext\mod.cpp -lpython27
    The system cannot find the path specified.

    Traceback (most recent call last):
    File “”, line 1, in
    import theano
    File “C:\Users\msmache\WinPython-64bit-\python-2.7.6.amd64\lib\site-packages\theano-0.9.0dev4-py2.7.egg\theano\”, line 66, in
    from theano.compile import (
    File “C:\Users\msmache\WinPython-64bit-\python-2.7.6.amd64\lib\site-packages\theano-0.9.0dev4-py2.7.egg\theano\compile\”, line 10, in
    from theano.compile.function_module import *
    File “C:\Users\msmache\WinPython-64bit-\python-2.7.6.amd64\lib\site-packages\theano-0.9.0dev4-py2.7.egg\theano\compile\”, line 21, in
    import theano.compile.mode
    File “C:\Users\msmache\WinPython-64bit-\python-2.7.6.amd64\lib\site-packages\theano-0.9.0dev4-py2.7.egg\theano\compile\”, line 10, in
    import theano.gof.vm
    File “C:\Users\msmache\WinPython-64bit-\python-2.7.6.amd64\lib\site-packages\theano-0.9.0dev4-py2.7.egg\theano\gof\”, line 659, in
    from . import lazylinker_c
    File “C:\Users\msmache\WinPython-64bit-\python-2.7.6.amd64\lib\site-packages\theano-0.9.0dev4-py2.7.egg\theano\gof\”, line 127, in
    File “C:\Users\msmache\WinPython-64bit-\python-2.7.6.amd64\lib\site-packages\theano-0.9.0dev4-py2.7.egg\theano\gof\”, line 2309, in compile_str
    (status, compile_stderr.replace(‘\n’, ‘. ‘)))
    . ception: Compilation failed (return status=1): The system cannot find the path specified.

  9. Nida says:

    Traceback (most recent call last):
    File “C:\Users\Uzel\Desktop\DEEP LEARNÝNG\”, line 13, in
    import theano
    File “C:\Users\Uzel\Anaconda2\lib\site-packages\theano\”, line 42, in
    from theano.configdefaults import config
    File “C:\Users\Uzel\Anaconda2\lib\site-packages\theano\”, line 226, in
    File “C:\Users\Uzel\Anaconda2\lib\site-packages\theano\”, line 266, in AddConfigVar
    root=newroot, in_c_key=in_c_key)
    File “C:\Users\Uzel\Anaconda2\lib\site-packages\theano\”, line 276, in AddConfigVar
    configparam.__get__(root, type(root), delete_key=True)
    File “C:\Users\Uzel\Anaconda2\lib\site-packages\theano\”, line 324, in __get__
    self.__set__(cls, val_str)
    File “C:\Users\Uzel\Anaconda2\lib\site-packages\theano\”, line 335, in __set__
    self.val = self.filter(val)
    File “C:\Users\Uzel\Anaconda2\lib\site-packages\theano\”, line 383, in filter
    % (val, self.fullname), val)
    ValueError: (‘Invalid value (True;C:Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin) for configuration variable “nvcc.fastmath”.’, ‘True;C:Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin’)

    I have a this error what should I do? Please someone help me. I have visual studio 2015, Cuda 7.5, python 2.7 and theano of course.

Skip to main content