I'm on Windows 10 running python 3.5.4 through Anaconda with pyopencl 2017.2 from conda-forge, installed through Anaconda. My system is an i5 4670K with an R9 290 running driver version 17.11.1 with OpenCL Version 23.20.788.0.
When trying to import the pyopencl module I experience the following error
>>> import pyopencl as cl
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "[my home folder]\Anaconda3\lib\site-packages\pyopencl\__init__.py", line 37, in <module>
import pyopencl.cffi_cl as _cl
File "[my home folder]\Anaconda3\lib\site-packages\pyopencl\cffi_cl.py", line 39, in <module>
from pyopencl._cffi import ffi as _ffi
ImportError: DLL load failed: The specified module could not be found.
The error appears to occur when loading _cffi.pyd
. This error has similarities with problems shown in previous threads:
cffi load failure when trying to import PyOpenCL
pyopencl import error cffi.so undefined symbol
However, in spite of the installation completing (seemingly) without error, me installing the OCL SDK:s from both AMD and Intel the problem persists. I also updated my grahics card drivers.
I tried using Dependency Walker to check dependencies of _cffi.pyd
, as described in the following thread:
Python pyopencl DLL load failed even with latest drivers
This did turn up a lot of circular dependencies and missing dependencies under opencl.dll
with names beginning in API-MS-WIN
and EXT-MS-WIN
. The dependency errors persisted when renaming the opencl.dll
in /System32
and using the one in \Anaconda3\Library\bin
instead.
Doing a bit of searching I found this thread:
Dependency Walker: missing dlls
which basically says the missing dependencies are nothing to worry about.