Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Failed to load OpenCL runtime

I have compiled and installed the latest version of OpenCV on an AWS instance. So when I try running this python script: https://github.com/A7Zulu/crunchbase-db/blob/master/sift.py

I get this error:

Failed to load OpenCL runtime OpenCV Error: Unknown error code -220 (OpenCL function is not available: [clGetPlatformIDs]) in opencl_check_fn, file /usr/local/opencv/modules/core/src/opencl/runtime/opencl_core.cpp, line 194

But if I start a python shell and paste each line of code into it manually it will work. When I call this command: kp1, des1 = sift.detectAndCompute(img1,None) it will throw the above error, but if I call that same command again the error doesn't happen and it runs normally.

I was wondering how do I get my script to work without manually pasting things into a python shell.

Thanks for the help.