I am trying to use PyOpenCL for the first time on Windows 10 (64 bit) to accelerate some code using my GPU. When trying to import pyopencl I get the error:

File "C:\Users\me\Anaconda3\lib\site-packages\pyopencl\__init__.py", line 39, in <module> import pyopencl._cl as _cl ImportError: DLL load failed: The specified module could not be found."

I am using Python 3.6.8 and have the pyopencl 2018.2.5+cl21 package installed.

I have also just installed the latest CUDA toolkit cuda.10.1.105 and Visual Studio as recommended during the CUDA toolkit installation.

The OpenCl.dll file in the Windows\system32 folder, is the file version. I checked this by going into Computer Management clicking on my Nvidia GeForce GTX 1050 display adaptor.

From other post recommednations, I have tried substituting the OpenCl.dll file by others found in my system (see photo) without results. I have then reverted to the original file located in that folder.

Image for search results of 'OpenCl.dll'

I have also downloaded from and installed pyopencl‑2018.2.5+cl21‑cp36‑cp36m‑win_amd64.whl from https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyopencl, without success. The error keeps popping up.

I am completely new to OpenCL, CUDA etc. Please forgive me if the error is easy to solve. Thank you for your help and please let me know if you need any other information.

0 Answers