Search code examples
pythonopenclpyopencl

Installing pyopencl on Windows


I've got a GTX 770 which apparently installs opencl 1.1 with its graphics drivers. But I installed the AMD APP thing anyway (I've got an AMD cpu) and either way it doesn't matter because pyopencl just won't work! it keeps spitting out the same error upon importing;

Traceback (most recent call last):
  File "C:\Users\Vegard\Dropbox\programming\opencl\Something RT\PT.py", line 15, in <module>
    import pyopencl as cl
  File "C:\Python34\lib\site-packages\pyopencl\__init__.py", line 28, in <module>
    import pyopencl._cl as _cl
ImportError: DLL load failed: The specified procedure could not be found.

Most opencl demos and programs I run work just fine, so I think its something with pyopencl in particular. I guess I'm lacking some dependencies, or the binary was compiled with a higher version of opencl in mind? I've got visual studio 2008 and 2010. I've tried installing the 2013.1 and 2014.1 binaries. I figured maybe if I run setup.py from the .tar.gz I might have better luck but that won't work either. This is more of a general thing though, something with cygwincompiler.py not finding the ld, gcc, and dllwrap versions I have.

I've tried a lot of things like installing .NET and boost, and other obscure things. I really don't know what to do. I ran "depends" but it doesn't work too well with windows 7 64-bit apparently. I cant get pycuda to work either, it spits out pretty much the same error message. cuda working just fine as well. Maybe its the wrong version in this case as well, or since they are both sister projects the author has some other common dependencies I don't know about.

I've googled around a lot and just can't seem to find a solution. Any help is appreciated.


Solution

  • Well I got it running with Python(x,y) version 2.7. Everything just worked when i installed mako, pytools, numpy, and pyopencl (2012.2). Using only binaries from http://www.lfd.uci.edu/~gohlke/pythonlibs/. Is it perhaps 2012.2 using opencl 1.1? Because I only got a hold of 2013.2 and 2014.1 for py3.4