Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Using OpenCV with OpenSesame

Hi folks,

I've been trying to get to the point where I can use OpenCV ('import cv2') with OpenSesame.

I was getting this error initially because I was using 64 bit version with OpenSesame (I copied the relevant files into site-packages):

ImportError: dll load failed: %1 is not a valid win32 application

I've now reinstalled Anaconda (32 bit) and pip installed the 32 bit version of OpenCV and copied the files over to OpenSesame site-packages again, after deleting the 64 bit ones.

The error I'm getting now when I try to 'import cv2' is:

 ImportError: DLL load failed: The specified module could not be found

I've used 'imp.find_module("cv2")' and it is showing cv2.pyd in the OpenSesame site-packages, so not sure why it isn't being found.

Any idea why this is happening?

Thanks as always,

Boo.

Thanked by 1eduard

Comments

  • edited April 13

    Hi folks,

    My colleague solved the issue. Please see his comments below:

    "The best way to complete the installation is to install the package from within OpenSesame.

    This link gives the detailed instructions to do this using 'pip': https://osdoc.cogsci.nl/3.1/manual/environment/

    In short,

    In the debug terminal: import pip

    followed by: pip.main(['install', 'opencv-python'])

    That should install OpenCV in OpenSesame.

    Note: You need to run OpenSesame as Admin in Windows or using sudo in Mac/Linux in order to allow installation."

Sign In or Register to comment.