• Register
1 vote
19 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 creating your pyproject.toml config.


--> /usr/local/bin/python3 -m poetry add opencv-python
Using version ^4.2 for opencv-python

Updating dependencies
Resolving dependencies...

Writing lock file


Package operations: 1 install, 0 updates, 0 removals

  - Installing opencv-python (4.2.0.34);
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. Please help.

10 7 2
6,060 points

Please log in or register to answer this question.

1 Answer

1 vote
 
Best answer

Answer:

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  the most important thing is if you are using the anaconda command prompt it may cause a problem. Use windows command prompt instead.

11 6 4
34,950 points

Related questions

0 votes
1 answer 5 views
5 views
Problem: When I type import python in the console I get the error.
asked Apr 28 salim1 60.6k points
0 votes
1 answer 43 views
43 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 ... 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.
asked Mar 9, 2020 LizzyM 6.1k points
0 votes
1 answer 41 views
41 views
Problem: I am trying to call a python file "hello.py" from within the python interpreter with subprocess. But I am unable to resolve this error: OSError: [WinError 193] %1 is not a valid Win32 application Also is there any alternate way to "call a python script with arguments" other than using subprocess? Thanks in advance.
asked Apr 2 ummesalma 29.2k points
0 votes
1 answer 100 views
100 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, 2020 Raphael Pacheco 4.9k points
0 votes
1 answer 4 views
4 views
Problem: Why I get this I need your suggestion to fix > System badimageformatexception is not a valid win32 application
asked 3 days ago ochena 23.3k points
0 votes
1 answer 4 views
4 views
Problrm: Looking for some help," Setup exe is not a valid win32 application ".
asked Apr 12 salim1 60.6k points
0 votes
1 answer 3 views
3 views
Problem python.exe is not a valid win32 application error coming suddenly. Can someone give me a hand to solve Why getting this error?
asked Apr 8 neeraj 10.5k points
0 votes
1 answer 10 views
10 views
Problem: When I run the installed .exe on Windows XP, I get the following message: <appName>.exe is not a valid Win32 application. How can I get the program to work on Windows XP?
asked Mar 24 ummesalma 29.2k points
0 votes
1 answer 16 views
16 views
Problem: How to fix this error: socket.error: command python setup.py egg_info failed HELP! I need help understanding this error: command python setup.py egg_info failed Can someone please help fix this, I am new in python() : command python setup.py egg_info failed
asked Mar 1 Mashhoodch 13k points