Jesse Hinrichsen <[email protected]> writes: > Hi Andreas, > > yes CL/cl.h exists. > I were able to get a few steps further and successfully compile it with pip > by setting the > C++ library path (LIBRARY_PATH) and and the C++ include path > (CPLUS_INCLUDE_PATH). > Unfortunately i get an error now when importing pyopencl in python. > >>>> import pyopencl > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "~/gpupy/local/lib/python2.7/site-packages/pyopencl/__init__.py", line > 28, in > <module> > import pyopencl._cl as _cl > ImportError: libOpenCL.so.1: cannot open shared object file: No such file or > directory > > Even though I am able to run > > gcc test.cpp -lOpenCL -o test > > without any problem. > I don't understand though how the linking of those extensions actually work. > In the library > path I don't have libOpenCL.so.1 but I have libnvidia-opencl.so.1 . > I guess this libnvidia-opencl.so.1 is responsible for -lOpenCL to work but > _cl.so tries to > find libOpenCL.so.1 based on the library name. > > I don't know if I am on the right track. I guess I have to investigate the > pyopencl source > files to understand how it compiles. Or do you have an idea?
Looks like you might be close. Set LD_LIBRARY_PATH to include wherever Nvidia's libOpenCL.so.1 ended up, and you should be good to go. Andreas _______________________________________________ PyOpenCL mailing list [email protected] https://lists.tiker.net/listinfo/pyopencl
