{
  "id": 12677,
  "title": "Install Theano on Windows 8.1 with GPU enabled: pycuda installation problems",
  "url": "/competitions/datasciencebowl/discussion/12677",
  "author_name": "Buzz Lightyear",
  "post_date": "2015-03-04T11:03:15.457000",
  "votes": 0,
  "comment_count": 29,
  "views": 29331,
  "content": "<p>Dear All,</p>\n<p>I'm getting crazy on installing Theano. I've a laptop with two graphic cards, one of them being NVIDIA GeForce GT 750M and Windows 8.1 as operating system.</p>\n<p>I followed the instruction on&nbsp;</p>\n<p>http://stackoverflow.com/questions/25729969/installing-theano-on-windows-8-with-gpu-enabled</p>\n<ol>\n<li><span style=\"line-height: 1.4\">Microsoft Visual Studio 12.0 installation;</span></li>\n<li><span style=\"line-height: 1.4\">CUDA&nbsp;6.5 installation (64-bit Notebook version). It was successful (I launched deviceQuery);</span></li>\n<li><span style=\"line-height: 1.4\">Python, Git, MinnGW, Cygwin installation;</span></li>\n<li>Modified the msvc9compiler.py file and added the line:&nbsp;ld_args.append('/MANIFEST')</li>\n<li>PyCUDA installation doesn't work!</li>\n</ol>\n<ul>\n<li>Downloaded pycuda-2014.1.tar.gz</li>\n<li>From Visual Studio Command Prompt 2012 went to the directory where tarball was extracted and executed &quot;python configure.py&quot;</li>\n<li>Then opened ./siteconf.py and modified it:</li>\n</ul>\n\n<p><code>BOOST_INC_DIR = []<br>BOOST_LIB_DIR = []<br>BOOST_COMPILER = 'gcc43'<br>USE_SHIPPED_BOOST = True<br>BOOST_PYTHON_LIBNAME = ['boost_python-py27']<br>BOOST_THREAD_LIBNAME = ['boost_thread']<br>CUDA_TRACE = False<br>CUDA_ROOT = 'C:\\\\Program Files\\\\NVIDIA GPU Computing Toolkit\\\\CUDA\\\\v6.5'<br>CUDA_ENABLE_GL = False<br>CUDA_ENABLE_CURAND = True<br>CUDADRV_LIB_DIR = ['${CUDA_ROOT}/lib', '${CUDA_ROOT}/lib/x64']<br>CUDADRV_LIBNAME = ['cuda']<br>CUDART_LIB_DIR = ['${CUDA_ROOT}/lib', '${CUDA_ROOT}/lib/x64']<br>CUDART_LIBNAME = ['cudart']<br>CURAND_LIB_DIR = ['${CUDA_ROOT}/lib', '${CUDA_ROOT}/lib/x64']<br>CURAND_LIBNAME = ['curand']<br>CXXFLAGS = ['/EHsc']<br>LDFLAGS = ['/FORCE']<br></code></p>\n\n<p>(my cuda path is&nbsp;C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v6.5\\lib\\x64)</p>\n<p>6. then executed the following commands:&nbsp;</p>\n<p><code>set VS90COMNTOOLS=%VS100COMNTOOLS%<br>python setup.py build<br>python setup.py install</code></p>\n<p>I don't receive any error.</p>\n<p>7.&nbsp;Created this python file:</p>\n<p><code># from: http://documen.tician.de/pycuda/tutorial.html<br>import pycuda.gpuarray as gpuarray<br>import pycuda.driver as cuda<br>import pycuda.autoinit<br>import numpy<br>a_gpu = gpuarray.to_gpu(numpy.random.randn(4,4).astype(numpy.float32))<br>a_doubled = (2*a_gpu).get()<br>print a_doubled<br>print a_gpu</code></p>\n\n<p>and here there's something wrong (please see the screenshot attached).</p>\n<p>Would you give me a hand in understanding how to fix it?</p>\n<p>Thank you so much</p>\n<p>Cristian</p>",
  "messages": [
    {
      "id": 65473,
      "postDate": "2015-03-05T04:44:30.150Z",
      "content": "<p>hi there, many of these cool toolkits have been developed on linux systems.&nbsp; I recommend installing something like ubuntu and then install/build with only a couple of commands.</p>\n<p>I can understand one being apprehensive about committing to a dual boot...which does carry risks.&nbsp; Grab a 3 year old desktop from the recycling and put a used gpu in it (gtx 580 for 100 bucks!) and that'll get you going. Using linux these days is a lot easier than it used to be.</p>\n<p>Once you do this, you will never go back!&nbsp; Pinky-swear!</p>",
      "votes": 4
    },
    {
      "id": 77595,
      "postDate": "2015-05-08T10:17:25.193Z",
      "content": "<p>wait &nbsp;a minute...&nbsp;The important error message here seems to be:&nbsp;</p>\n<p><strong>nvcc fatal : redefinition of argument 'machine'</strong></p>\n<p>before reinstalling check it on google!&nbsp;</p>\n<p>----------------------------------------------------------------------------------------------------------------------------------</p>\n\n<p>- pycuda is not necessary for theano working</p>\n<p>- I wrote microsoft visual studio 12 + cuda 6.5</p>\n<p>- to install theano:</p>\n<ul>\n<li><span style=\"line-height: 1.4\">open Git Bash and clone from github --&gt;&nbsp;</span><span style=\"line-height: 1.4\">git clone git://github.com/Theano/Theano.git</span></li>\n<li>then from the folder where Theano files are --&gt;&nbsp;python setup.py install</li>\n</ul>",
      "votes": 1
    },
    {
      "id": 77574,
      "postDate": "2015-05-08T06:21:48.863Z",
      "content": "<p>Hello Mohammad,</p>\n<p>You get the error not because of that file missing, which indeed&nbsp;is in your file system.</p>\n<p>Try not to use that line (flags='-IC:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\include') in your .theanorc.txt) and check if it works.</p>\n<p>It's a real pain.... :-)</p>",
      "votes": 1
    },
    {
      "id": 65768,
      "postDate": "2015-03-09T10:34:13.543Z",
      "content": "<p>It was a pain, but at the end I've got Theano installed on a Windows 64-bit laptop.</p>\n<p>I had to uninstall and re-install Visual Studio, because of the damn&nbsp;crtdefs.h missing.</p>\n<p>Ciao!</p>\n<p>Cristian</p>",
      "votes": 1
    },
    {
      "id": 65533,
      "postDate": "2015-03-05T19:54:45.027Z",
      "content": "<p>Well, i was able to do gpu on windows (nolearn, lasagne and theano), but that was not easy.</p>\n<p>I used msys + mingw32 + win-builds (http://win-builds.org/1.5.0/msys-cygwin.html#_msys_installation)</p>\n<p>then installed cuda 6.5 &amp; python2.7</p>\n<p>For theano, i used the prebuilds packages from here :&nbsp;http://www.lfd.uci.edu/~gohlke/pythonlibs/#pil</p>\n<p>I had to install pthread port :&nbsp;https://sourceware.org/pthreads-win32/</p>\n<p>I had to change some python files (didn't write it up and don't remember which files, but i think it was to configure properly pthread in theano&nbsp;).</p>\n<p>And finally, there is a glitch with pylearn2 + cuda convnet.</p>\n<p>I had to&nbsp;add&nbsp;cuda_ndarray.pyd and&nbsp;libcuda_ndarray.pyd (got the two files from a tmp folder when python is compiling the cuda_convnet wrapper) to a folder in my PATH env variable.</p>\n<p>Hope this will help ! :)</p>\n\n<p>Edit : btw, here is my theanorc :&nbsp;</p>\n<p><em>[global]</em><br><em>device = gpu1</em><br><em>floatX = float32</em><br><em>nocleanup = True</em></p>\n<p><em>[nvcc]</em><br><em>flags=-LC:\\Python27\\libs</em><br><em>compiler_bindir=C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\bin</em><br><em>fastmath = True</em></p>",
      "votes": 1
    },
    {
      "id": 65507,
      "postDate": "2015-03-05T13:29:34.737Z",
      "content": "<p>[quote=zero zero;65473]</p>\n<p>I can understand one being apprehensive about committing to a dual boot...which does carry risks.&nbsp;</p>\n<p>[/quote]</p>\n<p>I finally gave up a few weeks ago trying to do GPU on windows. My solution was to install Ubuntu on a <em>completely different and brand-new drive</em> of my desktop. To switch environments, I just flip the boot priority when restarting.</p>\n<p>It's worked great.</p>",
      "votes": 2
    },
    {
      "id": 136538,
      "postDate": "2016-09-22T18:41:15.547Z",
      "content": "<p><a href=\"http://web.archive.org/web/20150601112123/http://machinelearning.berlin/\">http://web.archive.org/web/20150601112123/http://machinelearning.berlin/</a></p>",
      "rawMarkdown": "http://web.archive.org/web/20150601112123/http://machinelearning.berlin/"
    },
    {
      "id": 135063,
      "postDate": "2016-09-10T17:00:21.877Z",
      "content": "<p>[quote=Christian Schr&#246;der de Witt;80419]</p>\n<p>Hi, try this tutorial here, it's about installing Theano on Windows 8.1 x64:</p>\n<p><a href=\"http://machinelearning.berlin/?p=383\">http://machinelearning.berlin/?p=383</a></p>\n<p>I wrote it because I couldn't find anything that worked. If you stick exactly to the tutorial, it should work (you have few choices though).</p>\n<p>All the best Christian</p>\n<p>[/quote]</p>\n<p>Anyone knows if the tutorial is still availible somewhere else?</p>"
    },
    {
      "id": 80419,
      "postDate": "2015-05-29T21:23:00.453Z",
      "content": "<p>Hi, try this tutorial here, it's about installing Theano on Windows 8.1 x64:</p>\n<p><a href=\"http://machinelearning.berlin/?p=383\">http://machinelearning.berlin/?p=383</a></p>\n<p>I wrote it because I couldn't find anything that worked. If you stick exactly to the tutorial, it should work (you have few choices though).</p>\n<p>All the best Christian</p>"
    },
    {
      "id": 77589,
      "postDate": "2015-05-08T09:42:21.273Z",
      "content": "<p>But first check one more time your theanorc file.</p>\n<p>Does it have this line?</p>\n<p>[cuda]</p>\n<p>root=your_path_to_cuda (v7.0)</p>\n<p>root=C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v6.5&nbsp;&lt;--</p>"
    },
    {
      "id": 77588,
      "postDate": "2015-05-08T09:37:14.700Z",
      "content": "<p>Not being an expert, I'd suggest to unistall cuda 7.0 and install cuda 6.5, which is a version which has been demonstrated to work good on my windows laptop :-) together with Microsoft Visual Studio 12.0.</p>\n<p>Happy fighting :-)</p>\n<p>Let me know about it!</p>"
    },
    {
      "id": 77506,
      "postDate": "2015-05-07T18:42:36.893Z",
      "content": "<p>[quote=Buzz Lightyear;65768]</p>\n<p>It was a pain, but at the end I've got Theano installed on a Windows 64-bit laptop.</p>\n<p>I had to uninstall and re-install Visual Studio, because of the damn&nbsp;crtdefs.h missing.</p>\n<p>Ciao!</p>\n<p>Cristian</p>\n<p>[/quote]<br><br>Hello Buzz, i read this post for many times until i got to your last problem :<br><br>ValueError: Theano nvcc.flags support only parameter/value pairs without space between them. e.g.: '--machine 64' is not supported, but '--machine=64' is supported. Please add the '=' symbol. nvcc.flags value is ''-ID:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\include''<br><br>So i check for the missing file&nbsp;crtdefs.h, but it was on my system actually! And i have still the last problem what you suggest<br><br></p>"
    },
    {
      "id": 73189,
      "postDate": "2015-04-22T15:51:47.517Z",
      "content": "<p>Ciao Cristian,</p>\n<p>I did that already and placed the file in the proper dir, my problem is that I don't know how to replace that specific row with a row customized for Anaconda. Do you mean that in Anaconda that call is not needed so I can basically drop it or should I replace it? (therefore my question, I wouldn't know how)<br>As for now I'll try proceeding that way but I feel clumsier as I move on, lots of uncertainty, it's not my specialty I must admit.</p>\n<p>Thanks for you time,</p>\n<p>ciao,</p>\n<p>Luca</p>"
    },
    {
      "id": 73173,
      "postDate": "2015-04-22T14:19:20.880Z",
      "content": "<p>Ciao Luca,</p>\n<p>That call is aimed at&nbsp;add winpython stuff. But you don't have to configure that file (it's located here&nbsp;C:\\SciSoft\\WinPython-64bit-2.7.9.3\\scripts\\env.bat on my laptop). You should configure an other env.bat (which is located here&nbsp;&quot;C:\\Scisoft\\env.bat&quot; on my laptop) as I've mentioned above.</p>\n<p>Fammi sapere</p>\n<p>Ciao</p>\n<p>Cristian</p>"
    },
    {
      "id": 73144,
      "postDate": "2015-04-22T11:02:36.747Z",
      "content": "<p>Hi Buzz Lightyear,</p>\n<p>I&#8217;m trying to install Theano on my laptop as well, struggling quite a bit, maybe you can help. I&#8217;m using Anaconda and I&#8217;m following step by step the guide provided here: <a href=\"http://theano.readthedocs.org/en/latest/install_windows.html\">http://theano.readthedocs.org/en/latest/install_windows.html</a>. The same process you have been following. I&#8217;m stuck with the environment configuration script 'env.bat' needed to configure the system path. The tutorial example refers to a WinPython distribution but as I&#8217;m installing in Anaconda and I don&#8217;t know how to configure that following row:</p>\n<p>CALL %SCISOFT%\\WinPython-64bit-2.7.9.4\\scripts\\env.bat</p>\n<p>&nbsp;What location and file should I call in Anaconda (or since you are using WinPython) what is that Call aimed at in WinPython? so that I can try finding the same thingh in anaconda.</p>\n<p>Thanks,</p>\n<p>Saluti,</p>\n<p>Luca</p>"
    },
    {
      "id": 65575,
      "postDate": "2015-03-06T08:06:10.910Z",
      "content": "<p>Hi Gregory,</p>\n<p>If I had that line:</p>\n<p><code>flags=-IC:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\include</code></p>\n<p>or</p>\n<p><code>flags='-IC:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\include'</code></p>\n<p>to theanorc I got an other error message:</p>\n<p><code>ValueError: Theano nvcc.flags support only parameter/value pairs without space between them. e.g.: '--machine 64' is not supported, but '--machine=64' is supported. Please add the '=' symbol. nvcc.flags value is '-IC:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\include'</code></p>\n<p>Any other help/hint?</p>\n<p>Thank you</p>\n<p>Cristian</p>"
    },
    {
      "id": 65547,
      "postDate": "2015-03-05T21:23:14.790Z",
      "content": "<p>In your theanorc, i gess something like this should do the trick :</p>\n<p>[nvcc]</p>\n<p>flags=-IC:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\include</p>\n\n<p>Or you could add the visual include folder to your PATH (ugly)</p>"
    },
    {
      "id": 65545,
      "postDate": "2015-03-05T21:10:07.777Z",
      "content": "<p>Hi Gregory, thank you for your help!</p>\n<p>Could&nbsp;you be even more clear&nbsp;please? :-)</p>\n<p>How do I add that path as include path?</p>"
    },
    {
      "id": 65543,
      "postDate": "2015-03-05T20:54:04.723Z",
      "content": "<p><span style=\"line-height: 1.4\">Yes, it can't find &quot;</span><span style=\"line-height: 1.4\">crtdefs.h&quot;. Either add the following path as include path : &quot;C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\include&quot; (-I option), either use&nbsp;vcvarsall to properly setup your command prompt.</span></p>"
    },
    {
      "id": 65539,
      "postDate": "2015-03-05T20:27:22.230Z",
      "content": "<p>It's just a pain.... Now theano works but doesn't use the gpu. Arghhhhh!!!</p>\n<p>This is my laptop config is x64, nvcc/cuda 6.5, Python 2.7.9, WinPython-64bit-2.7.9.3, Windows 8.1, VS2013 and two graphic units (Intel HD Graphics 4600 and NVIDIA GeForce GT 750M).</p>\n<p>where gcc:<br>C:\\SciSoft\\TDM-GCC-64\\bin\\gcc.exe<br>C:\\Rtools\\gcc-4.6.3\\bin\\gcc.exe <br>C:\\MinGW\\bin\\gcc.exe</p>\n<p>where gendef:<br>C:\\SciSoft\\TDM-GCC-64\\x86_64-w64-mingw32\\bin\\gendef.exe</p>\n<p>where cl:<br>C:\\Program Files (x86)\\Common Files\\Microsoft\\Visual C++ for Python\\9.0\\VC\\bin\\amd64\\cl.exe <br>C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\bin\\amd64\\cl.exe</p>\n<p>where nvcc:<br>C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v6.5\\bin\\nvcc.exe</p>\n<p>I did a manual installation. Got the latest bleeding edge version GitHub and downloaded the latest zip. The .theanorc.txt file is located in C:\\SciSoft\\WinPython-64bit-2.7.9.3\\settings:</p>\n<p><code>[global]<br>device=gpu<br>floatX=float32</code></p>\n<p><code>[cuda]<br>root=C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v6.5</code></p>\n<p><code>[nvcc]<br>fastmath=True<br>compiler_bindir=C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\bin\\amd64<br>cxx=C:\\SciSoft\\TDM-GCC-64\\bin</code></p>\n<p><code>[blas] <br>ldflags=</code></p>\n<p>And here is what I get from a test....</p>\n<p><code>c:\\program files\\nvidia gpu computing toolkit\\cuda\\v6.5\\include\\host_config.h(149) : fatal error C1083: Impossibile aprire il file inclusione 'crtdefs.h': No such file or directory ERROR (theano.sandbox.cuda): Failed to compile cuda_ndarray.cu: ('nvcc return status', 2, 'for cmd', 'nvcc -shared -O3 --compiler-bindir C:\\\\Program Files (x86)\\\\Microsoft Visual Studio 12.0\\\\VC\\\\bin\\\\amd64 -Xlinker /DEBUG -D HAVE_ROUND -m64 -Xcompiler -DCUDA_NDARRAY_CUH=7772254ca6db84d79e28ecddbe019d53,-D NPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION,/Zi,/MD -Ic:\\\\scisoft\\\\theano-master\\\\theano\\\\sandbox\\\\cuda -IC:\\\\SciSoft\\\\WinPython-64bit-2.7.9.3\\\\python-2.7.9.amd64\\\\lib\\\\site-packages\\\\numpy\\\\core\\\\include -IC:\\\\SciSoft\\\\WinPython-64bit-2.7.9.3\\\\python-2.7.9.amd64\\\\include -o C:\\\\Users\\\\Cris\\\\AppData\\\\Local\\\\Theano\\\\compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_60_Stepping_3_GenuineIntel-2.7.9-64\\\\cuda_ndarray\\\\cuda_ndarray.pyd mod.cu -LC:\\\\SciSoft\\\\WinPython-64bit-2.7.9.3\\\\python-2.7.9.amd64\\\\libs -LC:\\\\SciSoft\\\\WinPython-64bit-2.7.9.3\\\\python-2.7.9.amd64 -lpython27 -lcublas -lcudart') ERROR:theano.sandbox.cuda:Failed to compile cuda_ndarray.cu: ('nvcc return status', 2, 'for cmd', 'nvcc -shared -O3 --compiler-bindir C:\\\\Program Files (x86)\\\\Microsoft Visual Studio 12.0\\\\VC\\\\bin\\\\amd64 -Xlinker /DEBUG -D HAVE_ROUND -m64 -Xcompiler -DCUDA_NDARRAY_CUH=7772254ca6db84d79e28ecddbe019d53,-D NPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION,/Zi,/MD -Ic:\\\\scisoft\\\\theano-master\\\\theano\\\\sandbox\\\\cuda -IC:\\\\SciSoft\\\\WinPython-64bit-2.7.9.3\\\\python-2.7.9.amd64\\\\lib\\\\site-packages\\\\numpy\\\\core\\\\include -IC:\\\\SciSoft\\\\WinPython-64bit-2.7.9.3\\\\python-2.7.9.amd64\\\\include -o C:\\\\Users\\\\Cris\\\\AppData\\\\Local\\\\Theano\\\\compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_60_Stepping_3_GenuineIntel-2.7.9-64\\\\cuda_ndarray\\\\cuda_ndarray.pyd mod.cu -LC:\\\\SciSoft\\\\WinPython-64bit-2.7.9.3\\\\python-2.7.9.amd64\\\\libs -LC:\\\\SciSoft\\\\WinPython-64bit-2.7.9.3\\\\python-2.7.9.amd64 -lpython27 -lcublas -lcudart') WARNING (theano.sandbox.cuda): CUDA is installed, but device gpu is not available (error: cuda unavilable) WARNING:theano.sandbox.cuda:CUDA is installed, but device gpu is not available (error: cuda unavilable)<br></code></p>\n<p>mod.cu</p>\n<p><code>['nvcc', '-shared', '-O3', '-use_fast_math', '--compiler-bindir', 'C:\\\\Program Files (x86)\\\\Microsoft Visual Studio 12.0\\\\VC\\\\bin\\\\amd64', '-Xlinker', '/DEBUG', '-D HAVE_ROUND', '-m64', '-Xcompiler', '-DCUDA_NDARRAY_CUH=7772254ca6db84d79e28ecddbe019d53,-D NPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION,/Zi,/MD', '-Ic:\\\\scisoft\\\\theano-master\\\\theano\\\\sandbox\\\\cuda', '-IC:\\\\SciSoft\\\\WinPython-64bit-2.7.9.3\\\\python-2.7.9.amd64\\\\lib\\\\site-packages\\\\numpy\\\\core\\\\include', '-IC:\\\\SciSoft\\\\WinPython-64bit-2.7.9.3\\\\python-2.7.9.amd64\\\\include', '-o', 'C:\\\\Users\\\\Cris\\\\AppData\\\\Local\\\\Theano\\\\compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_60_Stepping_3_GenuineIntel-2.7.9-64\\\\cuda_ndarray\\\\cuda_ndarray.pyd', 'mod.cu', '-LC:\\\\SciSoft\\\\WinPython-64bit-2.7.9.3\\\\python-2.7.9.amd64\\\\libs', '-LC:\\\\SciSoft\\\\WinPython-64bit-2.7.9.3\\\\python-2.7.9.amd64', '-lpython27', '-lcublas', '-lcudart']<br>NP time: 0.116000[s], theano time: 0.114000[s] (times should be close when run on CPU!)<br>Result difference: 0.000000</code></p>\n<p>Does anybody know why it doesn't use the gpu?&nbsp;Cuda is installed and pass the deviceQuery test!</p>\n<p>I've been spending days on it....</p>\n<p>Thank you for your help</p>\n<p>Cristian</p>"
    },
    {
      "id": 65538,
      "postDate": "2015-03-05T20:15:59.717Z",
      "content": "<p>I wasted countless hours/days trying to get this working on Windows 8.1. I finally gave up on this. It is just not very well supported. Best to stick with Linux distributions with and without GPU support.</p>"
    },
    {
      "id": 65496,
      "postDate": "2015-03-05T12:06:17.977Z",
      "content": "<p>Hi,</p>\n<p>Here Theano is still not working....<br>This is my laptop config is x64, nvcc/cuda 6.5, Python 2.7.9, WinPython-64bit-2.7.9.3, Windows 8.1, VS2013 and two graphic units (Intel HD Graphics 4600 and NVIDIA GeForce GT 750M).</p>\n<p>This is my env.bat in c:\\SciSoft</p>\n<p><code>REM configuration of paths<br>set VSFORPYTHON=&quot;C:\\Program Files (x86)\\Common Files\\Microsoft\\Visual C++ for Python\\9.0&quot;<br>set SCISOFT=%~dp0</code><code>REM add tdm gcc stuff<br>set PATH=%SCISOFT%\\TDM-GCC-64\\bin;%SCISOFT%\\TDM-GCC-64\\x86_64-<br>w64-mingw32\\bin;%PATH%</code><code>REM add winpython stuff<br>CALL %SCISOFT%\\WinPython-64bit-2.7.6.4\\scripts\\env.bat</code><code>REM configure path for msvc compilers<br>REM for a 32 bit installation change this line to<br>REM CALL %VSFORPYTHON%\\vcvarsall.bat<br>CALL %VSFORPYTHON%\\vcvarsall.bat amd64</code><code>REM return a shell<br>cmd.exe /k</code><code><br>where gcc:<br>C:\\SciSoft\\TDM-GCC-64\\bin\\gcc.exe<br>C:\\Rtools\\gcc-4.6.3\\bin\\gcc.exe <br>C:\\MinGW\\bin\\gcc.exe</code></p>\n<p>where gendef:<br>C:\\SciSoft\\TDM-GCC-64\\x86_64-w64-mingw32\\bin\\gendef.exe</p>\n<p>where cl:<br>C:\\Program Files (x86)\\Common Files\\Microsoft\\Visual C++ for Python\\9.0\\VC\\bin\\amd64\\cl.exe <br>C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\bin\\amd64\\cl.exe</p>\n<p>where nvcc:<br>C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v6.5\\bin\\nvcc.exe</p>\n<p>I uninstalled and re-installed Theano from github following the instructions.<br>The .theanorc.txt file is located in C:\\SciSoft\\WinPython-64bit-2.7.9.3\\settings:</p>\n<p><code><br>[global]<br>device = gpu<br>floatX = float32</code></p>\n<p><code>[nvcc]</code></p>\n<p><code>compiler_bindir=C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\bin\\amd64<br>cxx = C:\\SciSoft\\TDM-GCC-64\\bin<br>flags = --use-local-env --cl-version=2008</code></p>\n<p>But still not working.<br>Theano seems installed.... the main error message is &quot;global name 'CVM' is not defined&quot;</p>\n<p>Please check the notebook enclosed...<br>Thank you very much for your help</p>\n<p>Regards<br>Cristian</p>"
    },
    {
      "id": 65421,
      "postDate": "2015-03-04T18:01:44.993Z",
      "content": "<p>I tried an other way,&nbsp;following http://deeplearning.net/software/theano/install_windows.html#install-windows.</p>\n<p>1- Visual Studio 2013 and Cuda 6.5 installed.</p>\n<p>2- Install Microsoft Visual C++ Compiler for Python 2.7</p>\n<ul>\n<li><span style=\"line-height: 1.4\">executed &quot;msiexec /i VCForPython27.msi ALLUSERS=1&quot; into the download directory</span></li>\n<li>the package has been installed</li>\n<li>downloaded stdint.h and saved into &quot;C:\\Program Files (x86)\\Common Files\\Microsoft\\Visual C++ for Python\\9.0\\VC\\include\\stdint.h.&quot;</li>\n</ul>\n<p>3- Install TDM GCC in C:\\SciSoft\\TDM-GCC-64</p>\n<p>4- Install WinPython in C:\\SciSoft\\WinPython-64bit-2.7.9.3</p>\n<p>5- Configuring the environment. Saved the following shell script into c:\\scisoft\\env.bat to configure the system path:</p>\n<p><code>REM configuration of paths<br>set VSFORPYTHON=&quot;C:\\Program Files (x86)\\Common Files\\Microsoft\\Visual C++ for Python\\9.0&quot;<br>set SCISOFT=%~dp0<br> <br>REM add tdm gcc stuff<br>set PATH=%SCISOFT%\\TDM-GCC-64\\bin;%SCISOFT%\\TDM-GCC-64\\x86_64-w64-mingw32\\bin;%PATH%<br> <br>REM add winpython stuff<br>CALL %SCISOFT%\\WinPython-64bit-2.7.9.3\\scripts\\env.bat<br> <br>REM configure path for msvc compilers<br>REM for a 32 bit installation change this line to<br>REM CALL %VSFORPYTHON%\\vcvarsall.bat<br>CALL %VSFORPYTHON%\\vcvarsall.bat amd64<br> <br>REM return a shell<br>cmd.exe /k<br></code></p>\n<p>6- create a link library for GCC. I opened the WinPython Command Prompt from C:\\SciSoft\\WinPython-64bit-2.7.9.3 and executed:</p>\n<p><code>gendef WinPython-64bit-2.7.9.3\\python-2.7.9.amd64\\python27.dll<br>dlltool --dllname python27.dll --def python27.def --output-lib WinPython-64bit-2.7.9.3\\python-2.7.9.amd64\\libs\\libpython27.a</code></p>\n<p><br>7- install Theano from github in C:\\SciSoft\\Theano</p>\n<p>8- from C:\\SciSoft\\Theano</p>\n<p><code>python setup.py develop<br></code></p>\n<p>9- configure Theano for GPU use (.theanorc.txt file) placed in C:\\scisoft\\WinPython-64bit-2.7.9.3\\settings</p>\n<p><code>[global]<br>device = gpu<br>floatX = float32<br> <br>[nvcc]<br>flags = --use-local-env --cl-version=2008<br></code></p>\n<p>10- run a test&nbsp;<a>http://deeplearning.net/software/theano/tutorial/using_gpu.html#using-gpu</a></p>\n<p>I got an Error Message... please check the attached file....</p>\n\n<p>Thank you so much for your help!</p>\n<p>I won't give up :-)</p>"
    },
    {
      "id": 65410,
      "postDate": "2015-03-04T14:20:20.243Z",
      "content": "<p>@ sedielem: many thanks, but still in big troubles... As I wrote before cuda 6.5 is installed.</p>\n<p>Now I'm trying to install theano. I open Git Bash and I clone from github.</p>\n<p>git clone git://github.com/Theano/Theano.git</p>\n<p>Then from the folder where Theano files are:</p>\n<p>python setup.py install</p>\n<p>I got this long message error (please check the attached file).</p>\n<p>That's a nightmare...</p>\n<p>Thank you for your help!</p>"
    },
    {
      "id": 65403,
      "postDate": "2015-03-04T12:03:45.117Z",
      "content": "<p>you do not need PyCUDA unless you plan to use the FFT-based convolution implementation. As far as I'm aware there are no other components in Theano right now that depend on PyCUDA.</p>\n<p>If you want to install it anyway, I'm afraid I can't help you with that - but it shouldn't be necessary :)</p>"
    },
    {
      "id": 65396,
      "postDate": "2015-03-04T11:03:15.457Z",
      "content": "<p>Dear All,</p>\n<p>I'm getting crazy on installing Theano. I've a laptop with two graphic cards, one of them being NVIDIA GeForce GT 750M and Windows 8.1 as operating system.</p>\n<p>I followed the instruction on&nbsp;</p>\n<p>http://stackoverflow.com/questions/25729969/installing-theano-on-windows-8-with-gpu-enabled</p>\n<ol>\n<li><span style=\"line-height: 1.4\">Microsoft Visual Studio 12.0 installation;</span></li>\n<li><span style=\"line-height: 1.4\">CUDA&nbsp;6.5 installation (64-bit Notebook version). It was successful (I launched deviceQuery);</span></li>\n<li><span style=\"line-height: 1.4\">Python, Git, MinnGW, Cygwin installation;</span></li>\n<li>Modified the msvc9compiler.py file and added the line:&nbsp;ld_args.append('/MANIFEST')</li>\n<li>PyCUDA installation doesn't work!</li>\n</ol>\n<ul>\n<li>Downloaded pycuda-2014.1.tar.gz</li>\n<li>From Visual Studio Command Prompt 2012 went to the directory where tarball was extracted and executed &quot;python configure.py&quot;</li>\n<li>Then opened ./siteconf.py and modified it:</li>\n</ul>\n\n<p><code>BOOST_INC_DIR = []<br>BOOST_LIB_DIR = []<br>BOOST_COMPILER = 'gcc43'<br>USE_SHIPPED_BOOST = True<br>BOOST_PYTHON_LIBNAME = ['boost_python-py27']<br>BOOST_THREAD_LIBNAME = ['boost_thread']<br>CUDA_TRACE = False<br>CUDA_ROOT = 'C:\\\\Program Files\\\\NVIDIA GPU Computing Toolkit\\\\CUDA\\\\v6.5'<br>CUDA_ENABLE_GL = False<br>CUDA_ENABLE_CURAND = True<br>CUDADRV_LIB_DIR = ['${CUDA_ROOT}/lib', '${CUDA_ROOT}/lib/x64']<br>CUDADRV_LIBNAME = ['cuda']<br>CUDART_LIB_DIR = ['${CUDA_ROOT}/lib', '${CUDA_ROOT}/lib/x64']<br>CUDART_LIBNAME = ['cudart']<br>CURAND_LIB_DIR = ['${CUDA_ROOT}/lib', '${CUDA_ROOT}/lib/x64']<br>CURAND_LIBNAME = ['curand']<br>CXXFLAGS = ['/EHsc']<br>LDFLAGS = ['/FORCE']<br></code></p>\n\n<p>(my cuda path is&nbsp;C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v6.5\\lib\\x64)</p>\n<p>6. then executed the following commands:&nbsp;</p>\n<p><code>set VS90COMNTOOLS=%VS100COMNTOOLS%<br>python setup.py build<br>python setup.py install</code></p>\n<p>I don't receive any error.</p>\n<p>7.&nbsp;Created this python file:</p>\n<p><code># from: http://documen.tician.de/pycuda/tutorial.html<br>import pycuda.gpuarray as gpuarray<br>import pycuda.driver as cuda<br>import pycuda.autoinit<br>import numpy<br>a_gpu = gpuarray.to_gpu(numpy.random.randn(4,4).astype(numpy.float32))<br>a_doubled = (2*a_gpu).get()<br>print a_doubled<br>print a_gpu</code></p>\n\n<p>and here there's something wrong (please see the screenshot attached).</p>\n<p>Would you give me a hand in understanding how to fix it?</p>\n<p>Thank you so much</p>\n<p>Cristian</p>"
    },
    {
      "id": 77597,
      "postDate": "2015-05-08T10:28:08.640Z",
      "rawMarkdown": "",
      "isDeleted": true
    },
    {
      "id": 77591,
      "postDate": "2015-05-08T09:54:47.093Z",
      "rawMarkdown": "",
      "isDeleted": true
    },
    {
      "id": 77590,
      "postDate": "2015-05-08T09:54:34.627Z",
      "rawMarkdown": "",
      "isDeleted": true
    },
    {
      "id": 77586,
      "postDate": "2015-05-08T09:15:33.437Z",
      "rawMarkdown": "",
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 65473,
      "author_name": "zero zero",
      "author_url": "",
      "post_date": "2015-03-05T04:44:30.150000",
      "content": "<p>hi there, many of these cool toolkits have been developed on linux systems.&nbsp; I recommend installing something like ubuntu and then install/build with only a couple of commands.</p>\n<p>I can understand one being apprehensive about committing to a dual boot...which does carry risks.&nbsp; Grab a 3 year old desktop from the recycling and put a used gpu in it (gtx 580 for 100 bucks!) and that'll get you going. Using linux these days is a lot easier than it used to be.</p>\n<p>Once you do this, you will never go back!&nbsp; Pinky-swear!</p>",
      "votes": 4,
      "replies": []
    },
    {
      "id": 77595,
      "author_name": "Buzz Lightyear",
      "author_url": "",
      "post_date": "2015-05-08T10:17:25.193000",
      "content": "<p>wait &nbsp;a minute...&nbsp;The important error message here seems to be:&nbsp;</p>\n<p><strong>nvcc fatal : redefinition of argument 'machine'</strong></p>\n<p>before reinstalling check it on google!&nbsp;</p>\n<p>----------------------------------------------------------------------------------------------------------------------------------</p>\n\n<p>- pycuda is not necessary for theano working</p>\n<p>- I wrote microsoft visual studio 12 + cuda 6.5</p>\n<p>- to install theano:</p>\n<ul>\n<li><span style=\"line-height: 1.4\">open Git Bash and clone from github --&gt;&nbsp;</span><span style=\"line-height: 1.4\">git clone git://github.com/Theano/Theano.git</span></li>\n<li>then from the folder where Theano files are --&gt;&nbsp;python setup.py install</li>\n</ul>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 77574,
      "author_name": "Buzz Lightyear",
      "author_url": "",
      "post_date": "2015-05-08T06:21:48.863000",
      "content": "<p>Hello Mohammad,</p>\n<p>You get the error not because of that file missing, which indeed&nbsp;is in your file system.</p>\n<p>Try not to use that line (flags='-IC:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\include') in your .theanorc.txt) and check if it works.</p>\n<p>It's a real pain.... :-)</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 65768,
      "author_name": "Buzz Lightyear",
      "author_url": "",
      "post_date": "2015-03-09T10:34:13.543000",
      "content": "<p>It was a pain, but at the end I've got Theano installed on a Windows 64-bit laptop.</p>\n<p>I had to uninstall and re-install Visual Studio, because of the damn&nbsp;crtdefs.h missing.</p>\n<p>Ciao!</p>\n<p>Cristian</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 65533,
      "author_name": "Gregory Godin",
      "author_url": "",
      "post_date": "2015-03-05T19:54:45.027000",
      "content": "<p>Well, i was able to do gpu on windows (nolearn, lasagne and theano), but that was not easy.</p>\n<p>I used msys + mingw32 + win-builds (http://win-builds.org/1.5.0/msys-cygwin.html#_msys_installation)</p>\n<p>then installed cuda 6.5 &amp; python2.7</p>\n<p>For theano, i used the prebuilds packages from here :&nbsp;http://www.lfd.uci.edu/~gohlke/pythonlibs/#pil</p>\n<p>I had to install pthread port :&nbsp;https://sourceware.org/pthreads-win32/</p>\n<p>I had to change some python files (didn't write it up and don't remember which files, but i think it was to configure properly pthread in theano&nbsp;).</p>\n<p>And finally, there is a glitch with pylearn2 + cuda convnet.</p>\n<p>I had to&nbsp;add&nbsp;cuda_ndarray.pyd and&nbsp;libcuda_ndarray.pyd (got the two files from a tmp folder when python is compiling the cuda_convnet wrapper) to a folder in my PATH env variable.</p>\n<p>Hope this will help ! :)</p>\n\n<p>Edit : btw, here is my theanorc :&nbsp;</p>\n<p><em>[global]</em><br><em>device = gpu1</em><br><em>floatX = float32</em><br><em>nocleanup = True</em></p>\n<p><em>[nvcc]</em><br><em>flags=-LC:\\Python27\\libs</em><br><em>compiler_bindir=C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\bin</em><br><em>fastmath = True</em></p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 65507,
      "author_name": "inversion",
      "author_url": "",
      "post_date": "2015-03-05T13:29:34.737000",
      "content": "<p>[quote=zero zero;65473]</p>\n<p>I can understand one being apprehensive about committing to a dual boot...which does carry risks.&nbsp;</p>\n<p>[/quote]</p>\n<p>I finally gave up a few weeks ago trying to do GPU on windows. My solution was to install Ubuntu on a <em>completely different and brand-new drive</em> of my desktop. To switch environments, I just flip the boot priority when restarting.</p>\n<p>It's worked great.</p>",
      "votes": 2,
      "replies": []
    },
    {
      "id": 136538,
      "author_name": "KharlanovSergey",
      "author_url": "",
      "post_date": "2016-09-22T18:41:15.547000",
      "content": "<p><a href=\"http://web.archive.org/web/20150601112123/http://machinelearning.berlin/\">http://web.archive.org/web/20150601112123/http://machinelearning.berlin/</a></p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 135063,
      "author_name": "djab",
      "author_url": "",
      "post_date": "2016-09-10T17:00:21.877000",
      "content": "<p>[quote=Christian Schr&#246;der de Witt;80419]</p>\n<p>Hi, try this tutorial here, it's about installing Theano on Windows 8.1 x64:</p>\n<p><a href=\"http://machinelearning.berlin/?p=383\">http://machinelearning.berlin/?p=383</a></p>\n<p>I wrote it because I couldn't find anything that worked. If you stick exactly to the tutorial, it should work (you have few choices though).</p>\n<p>All the best Christian</p>\n<p>[/quote]</p>\n<p>Anyone knows if the tutorial is still availible somewhere else?</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 80419,
      "author_name": "Christian Schröder de Witt",
      "author_url": "",
      "post_date": "2015-05-29T21:23:00.453000",
      "content": "<p>Hi, try this tutorial here, it's about installing Theano on Windows 8.1 x64:</p>\n<p><a href=\"http://machinelearning.berlin/?p=383\">http://machinelearning.berlin/?p=383</a></p>\n<p>I wrote it because I couldn't find anything that worked. If you stick exactly to the tutorial, it should work (you have few choices though).</p>\n<p>All the best Christian</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 77589,
      "author_name": "Buzz Lightyear",
      "author_url": "",
      "post_date": "2015-05-08T09:42:21.273000",
      "content": "<p>But first check one more time your theanorc file.</p>\n<p>Does it have this line?</p>\n<p>[cuda]</p>\n<p>root=your_path_to_cuda (v7.0)</p>\n<p>root=C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v6.5&nbsp;&lt;--</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 77588,
      "author_name": "Buzz Lightyear",
      "author_url": "",
      "post_date": "2015-05-08T09:37:14.700000",
      "content": "<p>Not being an expert, I'd suggest to unistall cuda 7.0 and install cuda 6.5, which is a version which has been demonstrated to work good on my windows laptop :-) together with Microsoft Visual Studio 12.0.</p>\n<p>Happy fighting :-)</p>\n<p>Let me know about it!</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 77506,
      "author_name": "mohammadahmed",
      "author_url": "",
      "post_date": "2015-05-07T18:42:36.893000",
      "content": "<p>[quote=Buzz Lightyear;65768]</p>\n<p>It was a pain, but at the end I've got Theano installed on a Windows 64-bit laptop.</p>\n<p>I had to uninstall and re-install Visual Studio, because of the damn&nbsp;crtdefs.h missing.</p>\n<p>Ciao!</p>\n<p>Cristian</p>\n<p>[/quote]<br><br>Hello Buzz, i read this post for many times until i got to your last problem :<br><br>ValueError: Theano nvcc.flags support only parameter/value pairs without space between them. e.g.: '--machine 64' is not supported, but '--machine=64' is supported. Please add the '=' symbol. nvcc.flags value is ''-ID:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\include''<br><br>So i check for the missing file&nbsp;crtdefs.h, but it was on my system actually! And i have still the last problem what you suggest<br><br></p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 73189,
      "author_name": "lucas",
      "author_url": "",
      "post_date": "2015-04-22T15:51:47.517000",
      "content": "<p>Ciao Cristian,</p>\n<p>I did that already and placed the file in the proper dir, my problem is that I don't know how to replace that specific row with a row customized for Anaconda. Do you mean that in Anaconda that call is not needed so I can basically drop it or should I replace it? (therefore my question, I wouldn't know how)<br>As for now I'll try proceeding that way but I feel clumsier as I move on, lots of uncertainty, it's not my specialty I must admit.</p>\n<p>Thanks for you time,</p>\n<p>ciao,</p>\n<p>Luca</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 73173,
      "author_name": "Buzz Lightyear",
      "author_url": "",
      "post_date": "2015-04-22T14:19:20.880000",
      "content": "<p>Ciao Luca,</p>\n<p>That call is aimed at&nbsp;add winpython stuff. But you don't have to configure that file (it's located here&nbsp;C:\\SciSoft\\WinPython-64bit-2.7.9.3\\scripts\\env.bat on my laptop). You should configure an other env.bat (which is located here&nbsp;&quot;C:\\Scisoft\\env.bat&quot; on my laptop) as I've mentioned above.</p>\n<p>Fammi sapere</p>\n<p>Ciao</p>\n<p>Cristian</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 73144,
      "author_name": "lucas",
      "author_url": "",
      "post_date": "2015-04-22T11:02:36.747000",
      "content": "<p>Hi Buzz Lightyear,</p>\n<p>I&#8217;m trying to install Theano on my laptop as well, struggling quite a bit, maybe you can help. I&#8217;m using Anaconda and I&#8217;m following step by step the guide provided here: <a href=\"http://theano.readthedocs.org/en/latest/install_windows.html\">http://theano.readthedocs.org/en/latest/install_windows.html</a>. The same process you have been following. I&#8217;m stuck with the environment configuration script 'env.bat' needed to configure the system path. The tutorial example refers to a WinPython distribution but as I&#8217;m installing in Anaconda and I don&#8217;t know how to configure that following row:</p>\n<p>CALL %SCISOFT%\\WinPython-64bit-2.7.9.4\\scripts\\env.bat</p>\n<p>&nbsp;What location and file should I call in Anaconda (or since you are using WinPython) what is that Call aimed at in WinPython? so that I can try finding the same thingh in anaconda.</p>\n<p>Thanks,</p>\n<p>Saluti,</p>\n<p>Luca</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 65575,
      "author_name": "Buzz Lightyear",
      "author_url": "",
      "post_date": "2015-03-06T08:06:10.910000",
      "content": "<p>Hi Gregory,</p>\n<p>If I had that line:</p>\n<p><code>flags=-IC:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\include</code></p>\n<p>or</p>\n<p><code>flags='-IC:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\include'</code></p>\n<p>to theanorc I got an other error message:</p>\n<p><code>ValueError: Theano nvcc.flags support only parameter/value pairs without space between them. e.g.: '--machine 64' is not supported, but '--machine=64' is supported. Please add the '=' symbol. nvcc.flags value is '-IC:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\include'</code></p>\n<p>Any other help/hint?</p>\n<p>Thank you</p>\n<p>Cristian</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 65547,
      "author_name": "Gregory Godin",
      "author_url": "",
      "post_date": "2015-03-05T21:23:14.790000",
      "content": "<p>In your theanorc, i gess something like this should do the trick :</p>\n<p>[nvcc]</p>\n<p>flags=-IC:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\include</p>\n\n<p>Or you could add the visual include folder to your PATH (ugly)</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 65545,
      "author_name": "Buzz Lightyear",
      "author_url": "",
      "post_date": "2015-03-05T21:10:07.777000",
      "content": "<p>Hi Gregory, thank you for your help!</p>\n<p>Could&nbsp;you be even more clear&nbsp;please? :-)</p>\n<p>How do I add that path as include path?</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 65543,
      "author_name": "Gregory Godin",
      "author_url": "",
      "post_date": "2015-03-05T20:54:04.723000",
      "content": "<p><span style=\"line-height: 1.4\">Yes, it can't find &quot;</span><span style=\"line-height: 1.4\">crtdefs.h&quot;. Either add the following path as include path : &quot;C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\include&quot; (-I option), either use&nbsp;vcvarsall to properly setup your command prompt.</span></p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 65539,
      "author_name": "Buzz Lightyear",
      "author_url": "",
      "post_date": "2015-03-05T20:27:22.230000",
      "content": "<p>It's just a pain.... Now theano works but doesn't use the gpu. Arghhhhh!!!</p>\n<p>This is my laptop config is x64, nvcc/cuda 6.5, Python 2.7.9, WinPython-64bit-2.7.9.3, Windows 8.1, VS2013 and two graphic units (Intel HD Graphics 4600 and NVIDIA GeForce GT 750M).</p>\n<p>where gcc:<br>C:\\SciSoft\\TDM-GCC-64\\bin\\gcc.exe<br>C:\\Rtools\\gcc-4.6.3\\bin\\gcc.exe <br>C:\\MinGW\\bin\\gcc.exe</p>\n<p>where gendef:<br>C:\\SciSoft\\TDM-GCC-64\\x86_64-w64-mingw32\\bin\\gendef.exe</p>\n<p>where cl:<br>C:\\Program Files (x86)\\Common Files\\Microsoft\\Visual C++ for Python\\9.0\\VC\\bin\\amd64\\cl.exe <br>C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\bin\\amd64\\cl.exe</p>\n<p>where nvcc:<br>C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v6.5\\bin\\nvcc.exe</p>\n<p>I did a manual installation. Got the latest bleeding edge version GitHub and downloaded the latest zip. The .theanorc.txt file is located in C:\\SciSoft\\WinPython-64bit-2.7.9.3\\settings:</p>\n<p><code>[global]<br>device=gpu<br>floatX=float32</code></p>\n<p><code>[cuda]<br>root=C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v6.5</code></p>\n<p><code>[nvcc]<br>fastmath=True<br>compiler_bindir=C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\bin\\amd64<br>cxx=C:\\SciSoft\\TDM-GCC-64\\bin</code></p>\n<p><code>[blas] <br>ldflags=</code></p>\n<p>And here is what I get from a test....</p>\n<p><code>c:\\program files\\nvidia gpu computing toolkit\\cuda\\v6.5\\include\\host_config.h(149) : fatal error C1083: Impossibile aprire il file inclusione 'crtdefs.h': No such file or directory ERROR (theano.sandbox.cuda): Failed to compile cuda_ndarray.cu: ('nvcc return status', 2, 'for cmd', 'nvcc -shared -O3 --compiler-bindir C:\\\\Program Files (x86)\\\\Microsoft Visual Studio 12.0\\\\VC\\\\bin\\\\amd64 -Xlinker /DEBUG -D HAVE_ROUND -m64 -Xcompiler -DCUDA_NDARRAY_CUH=7772254ca6db84d79e28ecddbe019d53,-D NPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION,/Zi,/MD -Ic:\\\\scisoft\\\\theano-master\\\\theano\\\\sandbox\\\\cuda -IC:\\\\SciSoft\\\\WinPython-64bit-2.7.9.3\\\\python-2.7.9.amd64\\\\lib\\\\site-packages\\\\numpy\\\\core\\\\include -IC:\\\\SciSoft\\\\WinPython-64bit-2.7.9.3\\\\python-2.7.9.amd64\\\\include -o C:\\\\Users\\\\Cris\\\\AppData\\\\Local\\\\Theano\\\\compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_60_Stepping_3_GenuineIntel-2.7.9-64\\\\cuda_ndarray\\\\cuda_ndarray.pyd mod.cu -LC:\\\\SciSoft\\\\WinPython-64bit-2.7.9.3\\\\python-2.7.9.amd64\\\\libs -LC:\\\\SciSoft\\\\WinPython-64bit-2.7.9.3\\\\python-2.7.9.amd64 -lpython27 -lcublas -lcudart') ERROR:theano.sandbox.cuda:Failed to compile cuda_ndarray.cu: ('nvcc return status', 2, 'for cmd', 'nvcc -shared -O3 --compiler-bindir C:\\\\Program Files (x86)\\\\Microsoft Visual Studio 12.0\\\\VC\\\\bin\\\\amd64 -Xlinker /DEBUG -D HAVE_ROUND -m64 -Xcompiler -DCUDA_NDARRAY_CUH=7772254ca6db84d79e28ecddbe019d53,-D NPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION,/Zi,/MD -Ic:\\\\scisoft\\\\theano-master\\\\theano\\\\sandbox\\\\cuda -IC:\\\\SciSoft\\\\WinPython-64bit-2.7.9.3\\\\python-2.7.9.amd64\\\\lib\\\\site-packages\\\\numpy\\\\core\\\\include -IC:\\\\SciSoft\\\\WinPython-64bit-2.7.9.3\\\\python-2.7.9.amd64\\\\include -o C:\\\\Users\\\\Cris\\\\AppData\\\\Local\\\\Theano\\\\compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_60_Stepping_3_GenuineIntel-2.7.9-64\\\\cuda_ndarray\\\\cuda_ndarray.pyd mod.cu -LC:\\\\SciSoft\\\\WinPython-64bit-2.7.9.3\\\\python-2.7.9.amd64\\\\libs -LC:\\\\SciSoft\\\\WinPython-64bit-2.7.9.3\\\\python-2.7.9.amd64 -lpython27 -lcublas -lcudart') WARNING (theano.sandbox.cuda): CUDA is installed, but device gpu is not available (error: cuda unavilable) WARNING:theano.sandbox.cuda:CUDA is installed, but device gpu is not available (error: cuda unavilable)<br></code></p>\n<p>mod.cu</p>\n<p><code>['nvcc', '-shared', '-O3', '-use_fast_math', '--compiler-bindir', 'C:\\\\Program Files (x86)\\\\Microsoft Visual Studio 12.0\\\\VC\\\\bin\\\\amd64', '-Xlinker', '/DEBUG', '-D HAVE_ROUND', '-m64', '-Xcompiler', '-DCUDA_NDARRAY_CUH=7772254ca6db84d79e28ecddbe019d53,-D NPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION,/Zi,/MD', '-Ic:\\\\scisoft\\\\theano-master\\\\theano\\\\sandbox\\\\cuda', '-IC:\\\\SciSoft\\\\WinPython-64bit-2.7.9.3\\\\python-2.7.9.amd64\\\\lib\\\\site-packages\\\\numpy\\\\core\\\\include', '-IC:\\\\SciSoft\\\\WinPython-64bit-2.7.9.3\\\\python-2.7.9.amd64\\\\include', '-o', 'C:\\\\Users\\\\Cris\\\\AppData\\\\Local\\\\Theano\\\\compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_60_Stepping_3_GenuineIntel-2.7.9-64\\\\cuda_ndarray\\\\cuda_ndarray.pyd', 'mod.cu', '-LC:\\\\SciSoft\\\\WinPython-64bit-2.7.9.3\\\\python-2.7.9.amd64\\\\libs', '-LC:\\\\SciSoft\\\\WinPython-64bit-2.7.9.3\\\\python-2.7.9.amd64', '-lpython27', '-lcublas', '-lcudart']<br>NP time: 0.116000[s], theano time: 0.114000[s] (times should be close when run on CPU!)<br>Result difference: 0.000000</code></p>\n<p>Does anybody know why it doesn't use the gpu?&nbsp;Cuda is installed and pass the deviceQuery test!</p>\n<p>I've been spending days on it....</p>\n<p>Thank you for your help</p>\n<p>Cristian</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 65538,
      "author_name": "Richard Giles",
      "author_url": "",
      "post_date": "2015-03-05T20:15:59.717000",
      "content": "<p>I wasted countless hours/days trying to get this working on Windows 8.1. I finally gave up on this. It is just not very well supported. Best to stick with Linux distributions with and without GPU support.</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 65496,
      "author_name": "Buzz Lightyear",
      "author_url": "",
      "post_date": "2015-03-05T12:06:17.977000",
      "content": "<p>Hi,</p>\n<p>Here Theano is still not working....<br>This is my laptop config is x64, nvcc/cuda 6.5, Python 2.7.9, WinPython-64bit-2.7.9.3, Windows 8.1, VS2013 and two graphic units (Intel HD Graphics 4600 and NVIDIA GeForce GT 750M).</p>\n<p>This is my env.bat in c:\\SciSoft</p>\n<p><code>REM configuration of paths<br>set VSFORPYTHON=&quot;C:\\Program Files (x86)\\Common Files\\Microsoft\\Visual C++ for Python\\9.0&quot;<br>set SCISOFT=%~dp0</code><code>REM add tdm gcc stuff<br>set PATH=%SCISOFT%\\TDM-GCC-64\\bin;%SCISOFT%\\TDM-GCC-64\\x86_64-<br>w64-mingw32\\bin;%PATH%</code><code>REM add winpython stuff<br>CALL %SCISOFT%\\WinPython-64bit-2.7.6.4\\scripts\\env.bat</code><code>REM configure path for msvc compilers<br>REM for a 32 bit installation change this line to<br>REM CALL %VSFORPYTHON%\\vcvarsall.bat<br>CALL %VSFORPYTHON%\\vcvarsall.bat amd64</code><code>REM return a shell<br>cmd.exe /k</code><code><br>where gcc:<br>C:\\SciSoft\\TDM-GCC-64\\bin\\gcc.exe<br>C:\\Rtools\\gcc-4.6.3\\bin\\gcc.exe <br>C:\\MinGW\\bin\\gcc.exe</code></p>\n<p>where gendef:<br>C:\\SciSoft\\TDM-GCC-64\\x86_64-w64-mingw32\\bin\\gendef.exe</p>\n<p>where cl:<br>C:\\Program Files (x86)\\Common Files\\Microsoft\\Visual C++ for Python\\9.0\\VC\\bin\\amd64\\cl.exe <br>C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\bin\\amd64\\cl.exe</p>\n<p>where nvcc:<br>C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v6.5\\bin\\nvcc.exe</p>\n<p>I uninstalled and re-installed Theano from github following the instructions.<br>The .theanorc.txt file is located in C:\\SciSoft\\WinPython-64bit-2.7.9.3\\settings:</p>\n<p><code><br>[global]<br>device = gpu<br>floatX = float32</code></p>\n<p><code>[nvcc]</code></p>\n<p><code>compiler_bindir=C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\bin\\amd64<br>cxx = C:\\SciSoft\\TDM-GCC-64\\bin<br>flags = --use-local-env --cl-version=2008</code></p>\n<p>But still not working.<br>Theano seems installed.... the main error message is &quot;global name 'CVM' is not defined&quot;</p>\n<p>Please check the notebook enclosed...<br>Thank you very much for your help</p>\n<p>Regards<br>Cristian</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 65421,
      "author_name": "Buzz Lightyear",
      "author_url": "",
      "post_date": "2015-03-04T18:01:44.993000",
      "content": "<p>I tried an other way,&nbsp;following http://deeplearning.net/software/theano/install_windows.html#install-windows.</p>\n<p>1- Visual Studio 2013 and Cuda 6.5 installed.</p>\n<p>2- Install Microsoft Visual C++ Compiler for Python 2.7</p>\n<ul>\n<li><span style=\"line-height: 1.4\">executed &quot;msiexec /i VCForPython27.msi ALLUSERS=1&quot; into the download directory</span></li>\n<li>the package has been installed</li>\n<li>downloaded stdint.h and saved into &quot;C:\\Program Files (x86)\\Common Files\\Microsoft\\Visual C++ for Python\\9.0\\VC\\include\\stdint.h.&quot;</li>\n</ul>\n<p>3- Install TDM GCC in C:\\SciSoft\\TDM-GCC-64</p>\n<p>4- Install WinPython in C:\\SciSoft\\WinPython-64bit-2.7.9.3</p>\n<p>5- Configuring the environment. Saved the following shell script into c:\\scisoft\\env.bat to configure the system path:</p>\n<p><code>REM configuration of paths<br>set VSFORPYTHON=&quot;C:\\Program Files (x86)\\Common Files\\Microsoft\\Visual C++ for Python\\9.0&quot;<br>set SCISOFT=%~dp0<br> <br>REM add tdm gcc stuff<br>set PATH=%SCISOFT%\\TDM-GCC-64\\bin;%SCISOFT%\\TDM-GCC-64\\x86_64-w64-mingw32\\bin;%PATH%<br> <br>REM add winpython stuff<br>CALL %SCISOFT%\\WinPython-64bit-2.7.9.3\\scripts\\env.bat<br> <br>REM configure path for msvc compilers<br>REM for a 32 bit installation change this line to<br>REM CALL %VSFORPYTHON%\\vcvarsall.bat<br>CALL %VSFORPYTHON%\\vcvarsall.bat amd64<br> <br>REM return a shell<br>cmd.exe /k<br></code></p>\n<p>6- create a link library for GCC. I opened the WinPython Command Prompt from C:\\SciSoft\\WinPython-64bit-2.7.9.3 and executed:</p>\n<p><code>gendef WinPython-64bit-2.7.9.3\\python-2.7.9.amd64\\python27.dll<br>dlltool --dllname python27.dll --def python27.def --output-lib WinPython-64bit-2.7.9.3\\python-2.7.9.amd64\\libs\\libpython27.a</code></p>\n<p><br>7- install Theano from github in C:\\SciSoft\\Theano</p>\n<p>8- from C:\\SciSoft\\Theano</p>\n<p><code>python setup.py develop<br></code></p>\n<p>9- configure Theano for GPU use (.theanorc.txt file) placed in C:\\scisoft\\WinPython-64bit-2.7.9.3\\settings</p>\n<p><code>[global]<br>device = gpu<br>floatX = float32<br> <br>[nvcc]<br>flags = --use-local-env --cl-version=2008<br></code></p>\n<p>10- run a test&nbsp;<a>http://deeplearning.net/software/theano/tutorial/using_gpu.html#using-gpu</a></p>\n<p>I got an Error Message... please check the attached file....</p>\n\n<p>Thank you so much for your help!</p>\n<p>I won't give up :-)</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 65410,
      "author_name": "Buzz Lightyear",
      "author_url": "",
      "post_date": "2015-03-04T14:20:20.243000",
      "content": "<p>@ sedielem: many thanks, but still in big troubles... As I wrote before cuda 6.5 is installed.</p>\n<p>Now I'm trying to install theano. I open Git Bash and I clone from github.</p>\n<p>git clone git://github.com/Theano/Theano.git</p>\n<p>Then from the folder where Theano files are:</p>\n<p>python setup.py install</p>\n<p>I got this long message error (please check the attached file).</p>\n<p>That's a nightmare...</p>\n<p>Thank you for your help!</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 65403,
      "author_name": "sedielem",
      "author_url": "",
      "post_date": "2015-03-04T12:03:45.117000",
      "content": "<p>you do not need PyCUDA unless you plan to use the FFT-based convolution implementation. As far as I'm aware there are no other components in Theano right now that depend on PyCUDA.</p>\n<p>If you want to install it anyway, I'm afraid I can't help you with that - but it shouldn't be necessary :)</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 77597,
      "author_name": "",
      "author_url": "",
      "post_date": "2015-05-08T10:28:08.640000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 77591,
      "author_name": "",
      "author_url": "",
      "post_date": "2015-05-08T09:54:47.093000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 77590,
      "author_name": "",
      "author_url": "",
      "post_date": "2015-05-08T09:54:34.627000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 77586,
      "author_name": "",
      "author_url": "",
      "post_date": "2015-05-08T09:15:33.437000",
      "content": "",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "65473": "",
    "77595": "",
    "77574": "",
    "65768": "",
    "65533": "",
    "65507": "",
    "136538": "http://web.archive.org/web/20150601112123/http://machinelearning.berlin/",
    "135063": "",
    "80419": "",
    "77589": "",
    "77588": "",
    "77506": "",
    "73189": "",
    "73173": "",
    "73144": "",
    "65575": "",
    "65547": "",
    "65545": "",
    "65543": "",
    "65539": "",
    "65538": "",
    "65496": "",
    "65421": "",
    "65410": "",
    "65403": "",
    "65396": "",
    "77597": "",
    "77591": "",
    "77590": "",
    "77586": ""
  }
}