Installing PyCUDA (Windows)

Due to the fact that most Python libraries are primarily written by and for Linux users, it is suggested that you install a pre-built PyCUDA wheel binary from Christoph Gohlke's site at the following address: https://www.lfd.uci.edu/~gohlke/pythonlibs/#pycuda. Download a file of the from pycuda‑2017.1.1+cuda(VERSION)‑cp27‑cp27m‑win_amd64.whl where version is your CUDA version number. You can now install PyCUDA by typing the following on the command line, and replacing pycuda.whl with the full path and filename of your PyCUDA wheel:

pip install pycuda.whl

(Alternatively, you can try installing PyCUDA from the PyPI repository with pip install pycuda , or by following the instructions on the PyCUDA website.)

Get Hands-On GPU Programming with Python and CUDA now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.