0

I've been successfully using Theano on my Windows 10 box for about a year.

Then Windows 10 forced me to update--- the "Creatives" mega-update.

Immediately after this update, I began getting the following error when running code that uses theano:

> C:\Winpython\WinPython-64bit-3.4.4.6Qt5\python-3.4.4.amd64\lib\site-packages\theano\sandbox\cuda\cnmem.cpp(39)
> : fatal error C1083: Cannot open include file: 'Windows.h': No such
> file or directory

The full error output is shown below:

C:\Winpython\WinPython-64bit-3.4.4.6Qt5\python-3.4.4.amd64\lib\site-packages\theano\sandbox\cuda\cuda_ndarray.cuh(17) : warning C4005: 'PyString_Check' : macro redefinition C:\Winpython\WinPython-64bit-3.4.4.6Qt5\python-3.4.4.amd64\lib\site-packages\numpy\core\include\numpy/npy_3kcompat.h(63) : see previous definition of 'PyString_Check' C:\Winpython\WinPython-64bit-3.4.4.6Qt5\python-3.4.4.amd64\lib\site-packages\theano\sandbox\cuda\cuda_ndarray.cuh(18) : warning C4005: 'PyString_FromString' : macro redefinition C:\Winpython\WinPython-64bit-3.4.4.6Qt5\python-3.4.4.amd64\lib\site-packages\numpy\core\include\numpy/npy_3kcompat.h(65) : see previous definition of 'PyString_FromString' C:\Winpython\WinPython-64bit-3.4.4.6Qt5\python-3.4.4.amd64\lib\site-packages\theano\sandbox\cuda\cuda_ndarray.cuh(19) : warning C4005: 'PyString_AsString' : macro redefinition C:\Winpython\WinPython-64bit-3.4.4.6Qt5\python-3.4.4.amd64\lib\site-packages\numpy\core\include\numpy/npy_3kcompat.h(72) : see previous definition of 'PyString_AsString' C:\Winpython\WinPython-64bit-3.4.4.6Qt5\python-3.4.4.amd64\lib\site-packages\theano\sandbox\cuda\cuda_ndarray.cuh(20) : warning C4005: 'PyString_FromStringAndSize' : macro redefinition C:\Winpython\WinPython-64bit-3.4.4.6Qt5\python-3.4.4.amd64\lib\site-packages\numpy\core\include\numpy/npy_3kcompat.h(66) : see previous definition of 'PyString_FromStringAndSize' C:\Winpython\WinPython-64bit-3.4.4.6Qt5\python-3.4.4.amd64\lib\site-packages\theano\sandbox\cuda\cuda_ndarray.cuh(21) : warning C4005: 'PyString_Size' : macro redefinition C:\Winpython\WinPython-64bit-3.4.4.6Qt5\python-3.4.4.amd64\lib\site-packages\numpy\core\include\numpy/npy_3kcompat.h(74) : see previous definition of 'PyString_Size' C:\Winpython\WinPython-64bit-3.4.4.6Qt5\python-3.4.4.amd64\lib\site-packages\theano\sandbox\cuda\cnmem.cpp(39) : fatal error C1083: Cannot open include file: 'Windows.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 --use-local-env --cl-version=2013 -Xlinker /DEBUG -D HAVE_ROUND -m64 -Xcompiler -DCUDA_NDARRAY_CUH=mc72d035fdf91890f3b36710688069b2e,-DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION,/Zi,/MD -IC:\Winpython\WinPython-64bit-3.4.4.6Qt5\python-3.4.4.amd64\lib\site-packages\theano\sandbox\cuda -IC:\Winpython\WinPython-64bit-3.4.4.6Qt5\python-3.4.4.amd64\lib\site-packages\numpy\core\include -IC:\Winpython\WinPython-64bit-3.4.4.6Qt5\python-3.4.4.amd64\include -IC:\Winpython\WinPython-64bit-3.4.4.6Qt5\python-3.4.4.amd64\lib\site-packages\theano\gof -o C:\Users\David\AppData\Local\Theano\compiledir_Windows-10-10.0.15063-Intel64_Family_6_Model_94_Stepping_3_GenuineIntel-3.4.4-64\cuda_ndarray\cuda_ndarray.pyd mod.cu -LC:\Winpython\WinPython-64bit-3.4.4.6Qt5\python-3.4.4.amd64\libs -LC:\Winpython\WinPython-64bit-3.4.4.6Qt5\python-3.4.4.amd64 -lcublas -lpython34 -lcudart') mod.cu

Itchydon
  • 2,572
  • 6
  • 19
  • 33
David R
  • 994
  • 1
  • 11
  • 27
  • I rolled back the update, and this error no longer shows up. Would still be interested in knowing what happened so that I can eventually update my windows. – David R Jul 30 '17 at 16:24
  • It is possible that the update confused my compiler as to whether 32-bit or 64-bit compilation was intended. I had installed a new version of WinPython in my efforts to solve this issue and after the rollback the problem persisted in the new version even though it was solved when running the older version. After a new call to %VSFORPYTHON%\vcvarsall.bat amd64 (where VSFORPYTHON is the appropriate VS compiler directory), the problem went away for the new version as well. I'm not going to reinstall the update to check this, but figured I'd mention it. – David R Jul 30 '17 at 17:45

0 Answers0