Home > other >  Error python3 import cv2: DLL load failed (tried many ways still can't solve)
Error python3 import cv2: DLL load failed (tried many ways still can't solve)

Time:10-06

First said the background
Windows 7, there is no problem but only on the Windows server 2008 r2 enterprise out of the question so my feeling is related to system
To rule out other problems I made the following methods:
Python version 3.6 is installed the first Visual c + + redistributable, 2015 systems are also updated
Whether through
PIP install opencv - python
PIP install opencv - contrib - python
Or through corresponding WHL installation downloaded from https://www.lfd.uci.edu/~gohlke/pythonlibs/
Import will still produce the following error when

C: \ Users \ \ Administrator \ Desktop> Ipython
Python 3.6.5 (v3.6.5: f59c0932b4, Mar 28 2018, 17:00:18) [MSC v. 1900 64 - bit (AMD6
4)]
Type "copyright", "credits" or "license" for more information
IPython 6.5.0 - An enhanced Interactive Python. Type '? 'for help.

In [1] : import cv2
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
ImportError Traceback (the most recent call last)
()
- & gt; 1 the import cv2

C: \ python36 \ cv2 \ set py in & lt; module> ()
1 the import importlib
2
- & gt; 3 from the cv2 import *
4 from the data import *
5

ImportError: DLL load failed: could not find the specified module,


For several days still not solve the problem for bosses told me to do the paid also solved please eat meal=-=

CodePudding user response:

Under the WHL installed?

CodePudding user response:

reference 1st floor seakingx response:
under the WHL installed?

3.6 corresponds to 36 WHL question I don't think the Windows 7 useless WHL is no problem

CodePudding user response:

Server 2008 with PIP might misjudge the operating system installation, led to the download version mismatch, download, should according to download on the python version, you have the latest file name cp36 and amd64 WHL installed should be able to solve the problem,
Install WHL process have error message?

CodePudding user response:

Vc "redistribution package whether the corresponding server version

CodePudding user response:

reference seakingx reply: 3/f
server 2008 with PIP might misjudge the operating system installation, led to the download version mismatch, download, should according to download on the python version, you have the latest file name cp36 and amd64 WHL installed should be able to solve the problem,
Install WHL process have error message?

The installation process without mistakes but the import will still appear error

CodePudding user response:

reference 4 floor oyljerry response:
vc "redistribution package whether the corresponding server version

How see? I see there are any other versions for 64 - bit and 32-bit call what name

CodePudding user response:

reference 4 floor oyljerry response:
vc "redistribution package whether the corresponding server version

According to the information of https://pypi.org/project/opencv-python/I installed the Visual c + + redistributable 2015

Supported Operating System
Windows 10, 7 Service Pack 1, Windows 8, Windows 8.1, Windows Server 2003 Service Pack 2, Windows Server 2008 R2 SP1, Windows Server 2008 Service Pack 2, Windows Server 2012, Windows Vista Service Pack 2, Windows XP Service Pack 3

My system is a Windows server 2008 r2 enterprise do not know if the support version if support that shows that there are other questions if you don't support me how to find the corresponding "redistribution package

CodePudding user response:

With the Dependency Walker, review what is missing DLL

CodePudding user response:

I also encountered similar problems, pyinstaller packaged exe, contains opencv, run on win10/Windows 7 computer works, on a Windows server 2012 r2 system prompt DLL load failed,
LZ solved excuse me

CodePudding user response:

https://blog.csdn.net/u014108439/article/details/103600014
  • Related