• Register
0 votes
57 views

In my system i have installed OPENCV but every time I run my code there is a error.

My code is :
 

import cv2



For this I am using 64 bit python on my system. But everytime I run this it shows me “ImportError : DLL load failed %1 is not valid win32 application”.

My python path also containns cv2.pyd and my OPENCV installaition does not have any release folders.

Can anyone tell me what the error is and DLL’s  is it looking for.

6.1k points
edited by

Please log in or register to answer this question.

1 Answer

0 votes

Check your python version by going to your command prompt and type:

   

   python --version

Make sure the python version you are using is 64bit. If you are using 32bit python version and installed a 64bit binaries for OPENCV it may cause this error. Or you may use the x86 version of OPENCV file .

You can also download OPENCV from https://pypi.org/project/opencv-python/

Or you can uninstall and reinstall python on your system it may work.

Also you can install opencv by using the command on your command prompt:

     

 pip install opencv-python

And finally if you and using the anaconda command prompt it may cause a problem. Use windows command prompt .

35k points
edited by