• Register
1 vote


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 (;
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


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 


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 39 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 52 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
1 vote
1 answer 3 views
Problem: From .cv2 import * importerror: dll load failed: the specified module could not be found.
asked 3 days ago Sofia Castro 3.6k points
0 votes
1 answer 17 views
Problem: I am starting my work with the images in Python and I am trying to start using PIL (Pillow). To install the PIL I ran the following command: pip install Pillow. While installing the PIL was not previously installed. I also tried to uninstall it and then reinstall it ... my PIL folder. Why is this showing me the error if the needed DLL is already there? How can a beginner like me fix it?
asked Aug 27, 2020 Raphael Pacheco 4.9k points
0 votes
1 answer 62 views
Problem : I am new to python. I have tried to install below softwares: Python 2.5.4, Numpy 1.5.0 win32, Matplotlib 1.0.0 win32, pywin32 218. After doing so much of hard work I am still unable to plot the graphs in Python. I am facing ... > from matplotlib._path import affine_transform ImportError: DLL load failed: The specified module could not be found. Can somebody help me in fixing this error?
asked Feb 22, 2020 mphil 2.3k points
0 votes
1 answer 2 views
Problem : failed to load jni shared library jvm.dll eclipse
asked 1 day ago Shovo210 2.5k points
0 votes
1 answer 17 views
Problem: I have installed JDK 1.0.7_25 and Android Studio bundle as instructed. After completing the installation when I tried to launch, I got the following error message: Failed to load JVM DLL C:\Program Files\Java\jdk1.7.0_25\jre If you already have a ... . I have created a JAVA_HOME variable as prescribed, but still getting the same error message. Now I'm a little frustrated about this
asked Feb 7 ahmedadel9090 2.6k points
0 votes
1 answer 481 views
Problem : Recently I have installed the tensorflow with a gpu support also with cuda toolkit v9.0 and cuDNNv7.1 and python 3.6 in the conda enviroment. When I tried below command it is giving me following error import tensorflow as tf Traceback (most ... _bootstrap._gcd_import(name[level:], package, level) ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed.
asked Feb 18, 2020 mphil 2.3k points
0 votes
2 answers 1K views
Problem : I have recently downloaded VS 2013 Community Edition and I have written the first app. When I try to run it, it usually shows me the below output section: 'ConsoleApplication1.exe' (Win32): Loaded 'D:\Users\Toshiba\Documents\Visual Studio 2019\Projects\ConsoleApplication1 ... so I know that the problem is not in my code. Have anybody faced the above issue and know the solution on it?
asked Dec 21, 2019 alecxe 7.5k points