Pyclesperanto-prototype doesn't work

I am trying to run pyclesperanto_prototype but failed to get it to work with my GPU (Tesla V100, Python 3.6.10):

>>> import pyclesperanto_prototype as cle
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/imjoy-engine/miniconda/lib/python3.6/site-packages/pyclesperanto_prototype/", line 1, in <module>
    from ._tier0 import *
  File "/imjoy-engine/miniconda/lib/python3.6/site-packages/pyclesperanto_prototype/_tier0/", line 3, in <module>
    from ._create import (
  File "/imjoy-engine/miniconda/lib/python3.6/site-packages/pyclesperanto_prototype/_tier0/", line 1, in <module>
    from ._pycl import OCLArray
  File "/imjoy-engine/miniconda/lib/python3.6/site-packages/pyclesperanto_prototype/_tier0/", line 206, in <module>
    if characterize.has_double_support(get_device().device):
  File "/imjoy-engine/miniconda/lib/python3.6/site-packages/pyclesperanto_prototype/_tier0/", line 44, in get_device
    return _current_device._instance or select_device()
  File "/imjoy-engine/miniconda/lib/python3.6/site-packages/pyclesperanto_prototype/_tier0/", line 59, in select_device
    device = filter_devices(name, dev_type, score_key)[-1]
  File "/imjoy-engine/miniconda/lib/python3.6/site-packages/pyclesperanto_prototype/_tier0/", line 83, in filter_devices
    for platform in cl.get_platforms():
pyopencl._cl.LogicError: clGetPlatformIDs failed: PLATFORM_NOT_FOUND_KHR

Tried to run clinfo and got clinfo: command not found, does that mean I need to install the opencl driver? I already did pip install pyopencl though.

It appears that the error comes from pyopencl:

>>> import pyopencl as cl
>>> cl.get_platforms()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
pyopencl._cl.LogicError: clGetPlatformIDs failed: PLATFORM_NOT_FOUND_KHR
1 Like

Hey @oeway,

thanks for testing pyclesperanto! On which operating system are you running? I think in linux you can install clinfo with apt-get install clinfo. I assume on Mac brew does it similarly. Windows binaries are available here:

Let me know if this helps!


Hey, thanks! works now!

Would be nice to add it to your documentation.

Jeey, great! How did you solve it @oeway? :upside_down_face:

I switched to another workstation (because I don’t have permission on the current one) and installed the OpenCL driver, then it worked!

1 Like