Here is my step-by-step adaptation of Christoph Bussler's directions to Windows 8 64 bit. May also work on windows 7, but I haven't tested it. If you can't find any of the specific package versions, then install the latest x64 build for your version of python.
- Installation
- for Windows 8 64 bit
- Warning
- install everything in its 64 bit version; otherwise it will not work
- Python
Download Python 3.3 for x86-64 here: http://www.python.org/ftp/python/3.3.0/python-3.3.0.amd64.msi
- install
- PyCUDA
- get pycuda-2013.1.1.win-amd64-py3.3.exe
- install
- Boost.Python
from http://www.lfd.uci.edu/~gohlke/pythonlibs/#boost.python
- boost_python-1.52.win-amd64-py3.3.exe
-
- numpy-MKL-1.7.1.win-amd64-py3.3.exe
- install
- CUDA
- Environment
- set HOME environment variable, e.g. to %HOMEDRIVE%%HOMEPATH% #not sure if this was strictly necessary, but I carried it over from Christoph Bussler's instructions
- setuptools
- get latest
- install with "python setup.py install"
-
- get latest
- install with "python setup.py install"
- Visual C++ 2010
I followed these instructions: http://www.mathworks.com/support/solutions/en/data/1-ECUGQX/
If the link goes dead, basically install Visual C++ 2010: http://www.microsoft.com/visualstudio/eng/downloads#d-2010-express
Then install Windows SDK 7.1, make sure that the C++ compiler is selected: http://msdn.microsoft.com/en-us/windows/bb980924.aspx
- Finally add this to the front of your path:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64;C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE;
-
- nvcc.profile
- Edit nvcc.profile (in CUDA\v5.0\bin) and set INCLUDES flag to this:
INCLUDES += "-I$(TOP)/include" "-I$(TOP)/include/cudart" "-IC:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include" $(_SPACE_)
- Fix vcvars64.bat
Follow this stackoverflow answer by Amitabh Mritunjai http://stackoverflow.com/questions/2970493/cuda-linking-error-visual-express-2008-nvcc-fatal-due-to-null-configuratio: 这个可不更改
I solved the problem by 1. installing Windows SDK (don't forget to choose all x64 options for 64 bit OS) 2. include "c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64" in PATH 3. create file vcvars64.bat inside directory "c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64" with following content: call "C:\Program Files\Microsoft SDKs\Windows\v8.1\Bin\SetEnv.cmd" /x64
If all went well, you should be able to run some of the example code after minor adaptations for python 3.3 (like changing 'print "HI"' to 'print ("HI")')
- nvcc.profile
加入系统变量
INCLUDE = C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt
LIB = C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\um\x64 + C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x64