1

Pulling my hair out here, about 8 hours in, sort of desperate about this...

Basically I get the following trace when running "import theano" from the Python command line:

Problem occurred during compilation with the command line below:
"C:\Users\User Name\Anaconda3\Scripts\g++.bat" -shared -g -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -m64 -DMS_WIN64 -I"C:\Users\User Name\Anaconda3\lib\site-packages\numpy\core\include" -I"C:\Users\User Name\Anaconda3\include" -I"C:\Users\User Name\Anaconda3\lib\site-packages\theano\gof" -L"C:\Users\User Name\Anaconda3\libs" -L"C:\Users\User Name\Anaconda3" -o C:\Users\User Name\AppData\Local\Theano\compiledir_Windows-10-10.0.14393-Intel64_Family_6_Model_94_Stepping_3_GenuineIntel-3.4.5-64\lazylinker_ext\lazylinker_ext.pyd C:\Users\User Name\AppData\Local\Theano\compiledir_Windows-10-10.0.14393-Intel64_Family_6_Model_94_Stepping_3_GenuineIntel-3.4.5-64\lazylinker_ext\mod.cpp -lpython34
g++.exe: error: Kronk\AppData\Local\Theano\compiledir_Windows-10-10.0.14393-Intel64_Family_6_Model_94_Stepping_3_GenuineIntel-3.4.5-64\lazylinker_ext\lazylinker_ext.pyd: No such file or directory
g++.exe: error: C:\Users\Charles: No such file or directory
g++.exe: error: Kronk\AppData\Local\Theano\compiledir_Windows-10-10.0.14393-Intel64_Family_6_Model_94_Stepping_3_GenuineIntel-3.4.5-64\lazylinker_ext\mod.cpp: No such file or directory

Traceback (most recent call last):
  File "C:\Users\User Name\Anaconda3\lib\site-packages\theano\gof\lazylinker_c.py", line 75, in <module>
    raise ImportError()
ImportError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\User Name\Anaconda3\lib\site-packages\theano\gof\lazylinker_c.py", line 92, in <module>
    raise ImportError()
ImportError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\User Name\Anaconda3\lib\site-packages\theano\__init__.py", line 70, in <module>
    from theano.compile import (
  File "C:\Users\User Name\Anaconda3\lib\site-packages\theano\compile\__init__.py", line 10, in <module>
    from theano.compile.function_module import *
  File "C:\Users\User Name\Anaconda3\lib\site-packages\theano\compile\function_module.py", line 21, in <module>
    import theano.compile.mode
  File "C:\Users\User Name\Anaconda3\lib\site-packages\theano\compile\mode.py", line 10, in <module>
    import theano.gof.vm
  File "C:\Users\User Name\Anaconda3\lib\site-packages\theano\gof\vm.py", line 659, in <module>
    from . import lazylinker_c
  File "C:\Users\User Name\Anaconda3\lib\site-packages\theano\gof\lazylinker_c.py", line 127, in <module>
    preargs=args)
  File "C:\Users\User Name\Anaconda3\lib\site-packages\theano\gof\cmodule.py", line 2323, in compile_str
    (status, compile_stderr.replace('\n', '. ')))
Exception: Compilation failed (return status=1): g++.exe: error: Kronk\AppData\Local\Theano\compiledir_Windows-10-10.0.14393-Intel64_Family_6_Model_94_Stepping_3_GenuineIntel-3.4.5-64\lazylinker_ext\lazylinker_ext.pyd: No such file or direc. g++.exe: error: Kronk\AppData\Local\Theano\compiledir_Windows-10-10.0.14393-Intel64_Family_6_Model_94_Stepping_3_Genui. Intel-3.4.5-64\lazylinker_ext\mod.cpp: No such file or directory

I've tried a dozen or so online tutorials at this point, so I'll go through what I've done so far/have installed.

SYSTEM SPECIFICATIONS: OS Name: Microsoft Windows 10 Home System Type: x64-based PC BIOS Mode: UEFI

PYTHON INSTALLATION [python -V]: Python 3.4.5 :: Anaconda custom (64-bit)

PYTHON PACKAGES INSTALLED [conda list]:

# packages in environment at C:\Users\User Name\Anaconda3:
#
_license                  1.1                      py34_1
alabaster                 0.7.9                    py34_0
anaconda                  custom                   py34_0
anaconda-client           1.5.3                    py34_0
argcomplete               1.0.0                    py34_1
astropy                   1.2.1               np111py34_0
babel                     2.3.4                    py34_0
backports_abc             0.4                      py34_0
bcolz                     1.0.0                    py34_0
beautiful-soup            4.3.2                    py34_1
binstar                   0.12                          2
bitarray                  0.8.1                    py34_1
blaze-core                0.9.0                    py34_0
blz                       removed                       0
bokeh                     0.12.3                   py34_1
boto                      2.43.0                   py34_0
bottleneck                1.1.0               np111py34_0
bzip2                     1.0.6                    vc10_3  [vc10]
certifi                   2016.2.28                py34_0
cffi                      1.8.3                    py34_0
click                     6.6                      py34_0
clyent                    1.2.2                    py34_0
colorama                  0.3.7                    py34_0
comtypes                  1.1.2                    py34_0
conda                     4.2.12                   py34_0
conda-build               2.0.7                    py34_0
conda-env                 2.6.0                         0
configobj                 5.0.6                    py34_0
cryptography              1.5.2                    py34_0
cycler                    0.10.0                   py34_0
cython                    0.25.1                   py34_0
cytoolz                   0.8.0                    py34_0
datashape                 0.5.2                    py34_0
decorator                 4.0.10                   py34_0
Django                    1.10.2                    <pip>
docutils                  0.12                     py34_2
dynd-python               removed                       0
entrypoints               0.2.2                    py34_0
et_xmlfile                1.0.1                    py34_0
fastcache                 1.0.2                    py34_1
filelock                  2.0.6                    py34_0
flask                     0.11.1                   py34_0
freetype                  2.5.5                    vc10_1  [vc10]
greenlet                  0.4.10                   py34_0
h5py                      2.6.0               np111py34_2
hdf5                      1.8.15.1                 vc10_4  [vc10]
idna                      2.1                      py34_0
imagesize                 0.7.1                    py34_0
ipykernel                 4.5.0                    py34_0
ipython                   5.1.0                    py34_0
ipython-notebook          4.0.4                    py34_3
ipython-qtconsole         4.0.1                    py34_4
ipython_genutils          0.1.0                    py34_0
itsdangerous              0.24                     py34_0
jdcal                     1.3                      py34_0
jedi                      0.9.0                    py34_1
jinja2                    2.8                      py34_1
jpeg                      8d                       vc10_2  [vc10]
jsonschema                2.5.1                    py34_0
jupyter_client            4.4.0                    py34_0
jupyter_core              4.2.0                    py34_0
Lasagne                   0.1                       <pip>
launcher                  1.0.0                         4
libpng                    1.6.22                   vc10_0  [vc10]
libpython                 3.4.3                     <pip>
libpython                 2.0                      py34_0
libtiff                   4.0.6                    vc10_2  [vc10]
llvmlite                  0.14.0                   py34_0
lxml                      3.6.4                    py34_0
m2w64-binutils            2.25.1                        4
m2w64-bzip2               1.0.6                         5
m2w64-crt-git             5.0.0.4636.2595836               1
m2w64-gcc                 5.3.0                         5
m2w64-gcc-ada             5.3.0                         5
m2w64-gcc-fortran         5.3.0                         5
m2w64-gcc-libgfortran     5.3.0                         5
m2w64-gcc-libs            5.3.0                         6
m2w64-gcc-objc            5.3.0                         5
m2w64-gmp                 6.1.0                         1
m2w64-headers-git         5.0.0.4636.c0ad18a               1
m2w64-isl                 0.16.1                        1
m2w64-libiconv            1.14                          5
m2w64-libmangle-git       5.0.0.4509.2e5a9a2               1
m2w64-libwinpthread-git   5.0.0.4634.697f757               1
m2w64-make                4.1.2351.a80a8b8               1
m2w64-mpc                 1.0.3                         2
m2w64-mpfr                3.1.4                         3
m2w64-pkg-config          0.29.1                        1
m2w64-toolchain           5.3.0                         6
m2w64-tools-git           5.0.0.4592.90b8472               1
m2w64-windows-default-manifest 6.4                           2
m2w64-winpthreads-git     5.0.0.4634.697f757               1
m2w64-zlib                1.2.8                         9
markupsafe                0.23                     py34_2
matplotlib                1.5.1               np111py34_0
menuinst                  1.4.2                    py34_1
mingw                     4.7                           1
mistune                   0.7.3                    py34_0
mkl                       11.3.3                        1
mkl-service               1.1.2                    py34_2
mock                      2.0.0                    py34_0
mpmath                    0.19                     py34_1
msys2-conda-epoch         20160418                      0
multipledispatch          0.4.9                    py34_0
mysqlclient               1.3.7                     <pip>
nbconvert                 4.2.0                    py34_0
nbformat                  4.1.0                    py34_0
networkx                  1.11                     py34_0
nltk                      3.2.1                    py34_0
node-webkit               0.10.1                        0
nose                      1.3.7                    py34_1
notebook                  4.2.3                    py34_0
numba                     0.29.0              np111py34_0
numexpr                   2.6.1               np111py34_1
numpy                     1.11.2                   py34_0
odo                       0.5.0                    py34_1
openpyxl                  2.4.0                    py34_0
openssl                   1.0.2j                   vc10_0  [vc10]
pandas                    0.19.0              np111py34_0
path.py                   8.2.1                    py34_0
patsy                     0.4.1                    py34_0
pbr                       1.10.0                   py34_0
pep8                      1.7.0                    py34_0
pickleshare               0.7.4                    py34_0
pillow                    3.4.2                    py34_0
pip                       8.1.2                    py34_0
pip                       9.0.0                     <pip>
pip                       8.1.2                     <pip>
pkginfo                   1.3.2                    py34_0
ply                       3.9                      py34_0
prompt_toolkit            1.0.8                    py34_0
psutil                    4.4.2                    py34_0
psycopg2                  2.6.2                     <pip>
py                        1.4.31                   py34_0
pyasn1                    0.1.9                    py34_0
pycosat                   0.6.1                    py34_1
pycparser                 2.16                     py34_0
pycrypto                  2.6.1                    py34_4
pyflakes                  1.3.0                    py34_0
pygments                  2.1.3                    py34_0
pyopenssl                 16.0.0                   py34_0
pyparsing                 2.1.4                    py34_0
pyqt                      4.11.4                   py34_7
pyreadline                2.1                      py34_0
pytables                  3.2.2               np111py34_4
pytest                    3.0.3                    py34_0
python                    3.4.5                         0
python-dateutil           2.5.3                    py34_0
pytz                      2016.7                   py34_0
pywin32                   220                      py34_1
pyyaml                    3.12                     py34_0
pyzmq                     16.0.0                   py34_0
qt                        4.8.7                    vc10_9  [vc10]
qtconsole                 4.2.1                    py34_0
requests                  2.11.1                   py34_0
rope                      0.9.4                    py34_1
ruamel_yaml               0.11.14                  py34_0
runipy                    0.1.3                    py34_0
scikit-image              0.12.3              np111py34_1
scikit-learn              0.17.1                    <pip>
scikit-learn              0.18                np111py34_0
scikit-neuralnetwork      0.7                       <pip>
scipy                     0.18.1              np111py34_0
setuptools                27.2.0                   py34_1
simplegeneric             0.8.1                    py34_1
sip                       4.18                     py34_0
six                       1.10.0                   py34_0
snowballstemmer           1.2.1                    py34_0
sockjs-tornado            1.0.3                    py34_0
sphinx                    1.4.8                    py34_0
sphinx_rtd_theme          0.1.9                    py34_0
spyder                    2.3.8                    py34_1
spyder-app                2.3.8                    py34_0
sqlalchemy                1.1.3                    py34_0
statsmodels               0.6.1               np111py34_1
sympy                     1.0                      py34_0
Theano                    0.9.0.dev4                <pip>
theano                    0.8.2                    py34_0
tk                        8.5.18                   vc10_0  [vc10]
toolz                     0.8.0                    py34_0
tornado                   4.4.2                    py34_0
traitlets                 4.3.1                    py34_0
ujson                     1.35                     py34_0
vs2010_runtime            10.00.40219.1                 2
wcwidth                   0.1.7                    py34_0
werkzeug                  0.11.11                  py34_0
wheel                     0.29.0                   py34_0
win_unicode_console       0.5                      py34_0
xlrd                      1.0.0                    py34_0
xlsxwriter                0.9.3                    py34_0
xlwings                   0.10.0                   py34_0
xlwt                      1.1.2                    py34_0
zlib                      1.2.8                    vc10_3  [vc10]

INSTALLED PROGRAMS (the ones I think are relevant?):

  • Microsoft .NET Framework 4.5 SDK
  • Microsoft .NET Framework 4.6 SDK
  • Microsoft .NET Framework 4.6.1 SDK
  • Microsoft Visual C++ 2005 Redistributable
  • Microsoft Visual C++ 2008 Redistributable
  • Microsoft Visual C++ 2010 Redistributable
  • Microsoft Visual C++ 2012 Redistributable
  • Microsoft Visual C++ 2013 Redistributable
  • Microsoft Visual C++ 2015 Redistributable
  • Microsoft Visual C++ Compilers 2010 SP1 Standard
  • Microsoft Visual Studio Community 2015 with Updates
  • Microsoft Visual Studio Express 2012 for Windows Desktop
  • Microsoft Visual Studio Express 2015 for Windows Desktop
  • Microsoft Windows SDK for Windows 7 (7.1)
  • NVIDIA CUDA Toolkit 5.5
  • NVIDIA Graphics Driver 354.74
  • TDM-GCC

ENVIRONMENTAL VARIABLES (echo %PATH%):

C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\libnvvp;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Common Files\lenovo\easyplussdk\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\SASHome\SASFoundation\9.4\ets\sasexe;C:\Program Files\SASHome\Secure\ccme4;C:\Program Files\SASHome\x86\Secure\ccme4;C:\Program Files (x86)\PharosSystems\Core;C:\Program Files (x86)\Brackets\command;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Program Files (x86)\Skype\Phone\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft Windows Performance Toolkit\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\WINDOWS\system32\config\systemprofile\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Users\User Name\Anaconda3;C:\Users\User Name\Anaconda3\Scripts;C:\Users\User Name\AppData\Roaming\npm;C:\Users\User Name\AppData\Local\Microsoft\WindowsApps;C:\TDM-GCC-64\x86_64-w64-mingw32\bin;C:\blaslapack;Name=THEANO_FLAGS, Value=floatX=float32,device=cpu,blas.ldflags=-LC:/blaslapack -lblas;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin

Any help would be VERY, VERY, VERY appreciated!!!!

Please let me know if more information is needed for a proper diagnosis.

EDIT 1:

The error I got following the tutorial posted by Andrej Žukov-Gregorič below:

Problem occurred during compilation with the command line below:
C:\Users\User Name\Anaconda3\envs\py34\MinGW\bin\g++.exe -shared -g -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -m64 -DMS_WIN64 -I"C:\Users\User Name\Anaconda3\envs\py34\lib\site-packages\numpy\core\include" -I"C:\Users\User Name\Anaconda3\envs\py34\include" -I"C:\Users\User Name\Anaconda3\envs\py34\lib\site-packages\theano\gof" -L"C:\Users\User Name\Anaconda3\envs\py34\libs" -L"C:\Users\User Name\Anaconda3\envs\py34" -o C:\Users\User Name\AppData\Local\Theano\compiledir_Windows-10-10.0.14393-Intel64_Family_6_Model_94_Stepping_3_GenuineIntel-3.4.5-64\lazylinker_ext\lazylinker_ext.pyd C:\Users\User Name\AppData\Local\Theano\compiledir_Windows-10-10.0.14393-Intel64_Family_6_Model_94_Stepping_3_GenuineIntel-3.4.5-64\lazylinker_ext\mod.cpp -lpython34
'C:\Users\User' is not recognized as an internal or external command,
operable program or batch file.

Traceback (most recent call last):
  File "C:\Users\User Name\Anaconda3\envs\py34\lib\site-packages\theano\gof\lazylinker_c.py", line 75, in <module>
    raise ImportError()
ImportError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\User Name\Anaconda3\envs\py34\lib\site-packages\theano\gof\lazylinker_c.py", line 92, in <module>
    raise ImportError()
ImportError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\User Name\Anaconda3\envs\py34\lib\site-packages\theano\__init__.py", line 70, in <module>
    from theano.compile import (
  File "C:\Users\User Name\Anaconda3\envs\py34\lib\site-packages\theano\compile\__init__.py", line 10, in <module>
    from theano.compile.function_module import *
  File "C:\Users\User Name\Anaconda3\envs\py34\lib\site-packages\theano\compile\function_module.py", line 21, in <module>
    import theano.compile.mode
  File "C:\Users\User Name\Anaconda3\envs\py34\lib\site-packages\theano\compile\mode.py", line 10, in <module>
    import theano.gof.vm
  File "C:\Users\User Name\Anaconda3\envs\py34\lib\site-packages\theano\gof\vm.py", line 659, in <module>
    from . import lazylinker_c
  File "C:\Users\User Name\Anaconda3\envs\py34\lib\site-packages\theano\gof\lazylinker_c.py", line 127, in <module>
    preargs=args)
  File "C:\Users\User Name\Anaconda3\envs\py34\lib\site-packages\theano\gof\cmodule.py", line 2323, in compile_str
    (status, compile_stderr.replace('\n', '. ')))
Exception: Compilation failed (return status=1): 'C:\Users\User' . operable program or batch file.or external command,

EDIT 2:

OK, so I messed up my .theanorc file... I had:

[global]
cxx=C:\Users\User Name\Anaconda3\envs\py34\MinGW\bin\g++.exe

Instead of

[global]
cxx="C:\Users\User Name\Anaconda3\envs\py34\MinGW\bin\g++.exe"

However, now I'm getting the following error:

Problem occurred during compilation with the command line below:
"C:\Users\User Name\Anaconda3\envs\py34\MinGW\bin\g++.exe" -shared -g -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -m64 -DMS_WIN64 -I"C:\Users\User Name\Anaconda3\envs\py34\lib\site-packages\numpy\core\include" -I"C:\Users\User Name\Anaconda3\envs\py34\include" -I"C:\Users\User Name\Anaconda3\envs\py34\lib\site-packages\theano\gof" -L"C:\Users\User Name\Anaconda3\envs\py34\libs" -L"C:\Users\User Name\Anaconda3\envs\py34" -o C:\Users\User Name\AppData\Local\Theano\compiledir_Windows-10-10.0.14393-Intel64_Family_6_Model_94_Stepping_3_GenuineIntel-3.4.5-64\lazylinker_ext\lazylinker_ext.pyd C:\Users\User Name\AppData\Local\Theano\compiledir_Windows-10-10.0.14393-Intel64_Family_6_Model_94_Stepping_3_GenuineIntel-3.4.5-64\lazylinker_ext\mod.cpp -lpython34
g++.exe: error: Name\AppData\Local\Theano\compiledir_Windows-10-10.0.14393-Intel64_Family_6_Model_94_Stepping_3_GenuineIntel-3.4.5-64\lazylinker_ext\lazylinker_ext.pyd: No such file or directory
g++.exe: error: C:\Users\User: No such file or directory
g++.exe: error: Name\AppData\Local\Theano\compiledir_Windows-10-10.0.14393-Intel64_Family_6_Model_94_Stepping_3_GenuineIntel-3.4.5-64\lazylinker_ext\mod.cpp: No such file or directory

Traceback (most recent call last):
  File "C:\Users\User Name\Anaconda3\envs\py34\lib\site-packages\theano\gof\lazylinker_c.py", line 75, in <module>
    raise ImportError()
ImportError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\User Name\Anaconda3\envs\py34\lib\site-packages\theano\gof\lazylinker_c.py", line 92, in <module>
    raise ImportError()
ImportError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\User Name\Anaconda3\envs\py34\lib\site-packages\theano\__init__.py", line 70, in <module>
    from theano.compile import (
  File "C:\Users\User Name\Anaconda3\envs\py34\lib\site-packages\theano\compile\__init__.py", line 10, in <module>
    from theano.compile.function_module import *
  File "C:\Users\User Name\Anaconda3\envs\py34\lib\site-packages\theano\compile\function_module.py", line 21, in <module>
    import theano.compile.mode
  File "C:\Users\User Name\Anaconda3\envs\py34\lib\site-packages\theano\compile\mode.py", line 10, in <module>
    import theano.gof.vm
  File "C:\Users\User Name\Anaconda3\envs\py34\lib\site-packages\theano\gof\vm.py", line 659, in <module>
    from . import lazylinker_c
  File "C:\Users\User Name\Anaconda3\envs\py34\lib\site-packages\theano\gof\lazylinker_c.py", line 127, in <module>
    preargs=args)
  File "C:\Users\User Name\Anaconda3\envs\py34\lib\site-packages\theano\gof\cmodule.py", line 2323, in compile_str
    (status, compile_stderr.replace('\n', '. ')))
Exception: Compilation failed (return status=1): g++.exe: error: Name\AppData\Local\Theano\compiledir_Windows-10-10.0.14393-Intel64_Family_6_Model_94_Stepping_3_GenuineIntel-3.4.5-64\lazylinker_ext\lazylinker_ext.pyd: No such file. g++.exe: error: Name\AppData\Local\Theano\compiledir_Windows-10-10.0.14393-Intel64_Family_6_Model_94_Stepping_3_GenuineIntel-3.4.5-64\lazylinker_ext\mo. cpp: No such file or directory
user3684314
  • 707
  • 11
  • 31

2 Answers2

3

Installing theano:

  1. Set up Anaconda - a free open source distribution of the python language. It comes with conda, its own package manager. Download the 64-bit python 3.x installer from Anaconda's website and install it.
  2. Install a python 3.4 environment (I've heard of people having problems with 3.5) by running conda create -n py34 python=3.4 anaconda. To switch from the default python 3.x environment to the 3.4 one just run activate py34.
  3. Run conda install mingw libpython this will install a c++ compiler into your py34 environment.
  4. Checkout the latest bleeding edge version of theano. Go to Theano's github page, click on Clone or download > Downdload ZIP.
  5. Run pip --no-cache-dir install theano-master.zip. (At the time of writing conda does not contain theano so you must use pip to install it.) The reason for the --no-cache-dir flag is to force a clean install and prevent pip from using any previously cached theano files.
  6. Create a blank file called .theanorc and place it in your home directory which is usually C:\Users\username on windows. Populate it with the following:

    [global]
    cxx=C:\<path_to_anaconda>\Anaconda3\envs\py34\MinGW\bin\g++.exe 
    

    This tells theano where to find the c++ compiler.

  7. Add g++.exe to your environment path

Tips:

  1. A nice linux console emulator for windows because the windows command prompt is just annoying for some: cmdr - use this to enter in your conda commands etc.
  2. How to set environment variables in windows - essentially, add ;C:\<path_to_anaconda>\Anaconda3\envs\py34\MinGW\bin\g++.exe to the end of your path.
  • I followed this and am getting a new error when I run `activate py34`, `python`, and `import theano`. (Note I did restart the command prompt once I changed the environmental variable, which is confirmed by running `echo %PATH%`). I will post the error as an edit to the original question. – user3684314 Nov 04 '16 at 15:33
  • Wait hold on... I messed something up, but I'm still getting a different error hold on... – user3684314 Nov 04 '16 at 15:43
  • Seems like it's pointing to the wrong location :( Did you enter your username correctly? Are there any spaces in the path? Did you call your python 3.4 environment py34? Not sure if this: http://stackoverflow.com/questions/3848357/createprocess-no-such-file-or-directory is related but maybe you have to reboot / open a new terminal. – Andrej Žukov-Gregorič Nov 04 '16 at 22:27
  • There are spaces in the path... Is there any way to solve that? Thanks!! – user3684314 Nov 07 '16 at 14:57
  • Take a look at this: http://stackoverflow.com/questions/39595392/windows-theano-keras-lazylinker-ext-mod-cpp-no-such-file-or-directory – Andrej Žukov-Gregorič Nov 08 '16 at 11:43
  • I'm confused about this... I added the line `compiledir="C:\Users\User Name"` and I'm getting an error: `ValueError: Unable to create the compiledir directory 'C:\Users\User Name\"C:\Users\User Name"\compiledir_Windows-10-10.0.14393-Intel64_Family_6_Model_94_Stepping_3_GenuineIntel-3.4.5-64'. Check the permissions.` which doesn't make any sense? – user3684314 Nov 08 '16 at 19:41
  • At least we now know the errors have to do with your filepaths. Are you sure you have full permissions in that dir? – Andrej Žukov-Gregorič Nov 08 '16 at 19:45
  • Which dir do you mean and which permissions? (Like read/write?) – user3684314 Nov 08 '16 at 21:37
0

I was able to install Theano for python 3 on my windows 10 machine with GPU support. For me I found the most helpful guide to be this one, and I followed it very carefully.

If you are looking for more inspiration you could try the links below as well, but I would strongly suggest only following the tutorial linked above. alt-link-1, alt-link-2

Good luck.

Alex
  • 12,078
  • 6
  • 64
  • 74