PyCUDA on Windows 8.1

After I had successfully installed Theano, about a week later (see my previous post), I went ahead and installed PyCUDA on my Windows 8.1 laptop.

To make this happen, I went to Christoph Gohlke’s “Unofficial Windows Binaries for Python Extension Packages” website.

Christoph noted that there are a few prerequisite Python packages for PyCUDA…however, all but two of these were already a part of the Anaconda distribution, so there were only 2 that I needed to download/install before installing PyCUDA:

  • appdirs-1.4.0-py2.py3-none-any.whl
  • pytools‑2015.1.1‑py2.py3‑none‑any.whl

…then I downloaded:

  • pycuda‑2015.1.2+cuda7028‑cp34‑none‑win_amd64.whl

[NOTE: very shortly after I did this, Gohlke updated his site and now (8/1) only lists “pytools” as the prerequisite Python package you will need to download…so whether or not I needed appdirs is an unknown!]

After downloading these three wheel files, I fired up a Windows Command Prompt, navigated to the Downloads folder, and installed all three sequentially via “pip install”:

  • pip install appdirs-1.4.0-py2.py3-none-any.whl
  • pip install pytools‑2015.1.1‑py2.py3‑none‑any.whl
  • pip install pycuda‑2015.1.2+cuda7028‑cp34‑none‑win_amd64.whl

After these three files were installed, I went to Will Landau’s excellent collection of PyCUDA code examples (which also has a nice accompanying video and slides) and downloaded them onto my machine. Of the dozen files, all but one worked (after making some minor Python3 tweaks here and there…). The only one that did not work was a file called “” which threw an import error telling me that I needed to install the Mako templating engine.

Outside of this very minor issue (which I may go ahead and correct here shortly by installing Mako), everything went pretty well.

NOTE: if you get an nvcc fatal error : cannot find compiler c1.exe in PATH, note the location of c1.exe in your Visual Studio installation (mine is 2013, so it lives in C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin). Just add this to your PATH variable, restart your machine and try again!!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s