• Register
0 votes
25 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.

10 7 2
6,060 points

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 .

11 6 4
34,950 points

Related questions

1 vote
1 answer 8 views
8 views
Problem: In my system i have installed OPENCV and I opened my compiler and wrote the code: import cv And it shows messeage: Updating package configuration --> /usr/local/bin/python3 -m poetry init --no-interaction This command will guide you through ... valid win32 application”. My python path also containns cv2.pyd and my OPENCV installaition does not have any release folders. Please help.
asked Apr 6 LizzyM 6.1k points
0 votes
1 answer 12 views
12 views
Problem: I am a beginner to java, swing, netbeans and promise. Now I am trying to read and write the Extensible Linking Format (ELF). Please find below the line of code at which I am facing the Error: p = r.exec("./optimizer " + sourceFile + " ... .java:620) at java.lang.Runtime.exec(Runtime.java:450) at java.lang.Runtime.exec(Runtime.java:347) at GUIMode.GUIMode.actionPerformed(GUIMode.java:213)
asked Aug 26 Raphael Pacheco 4.9k points
0 votes
1 answer 410 views
410 views
I have python 3 and python 2.7 installed in my system. I am a newbee and I tried to run file : ~/usr/bin/env python 2.7  But when I try to run the file it give me an error : ~/usr/bin/env python 2.7 No such file or directory How can I check my default python version? How can I run the file? How to run the file without changing my default python version?
asked Mar 9 LizzyM 6.1k points