Successfully solved Python import opencv error "DLL load failed while importing cv2: cannot find the specified module"

Scenario description: I use Tencent Cloud Server to do image processing projects, and an error is reported when importing opencv.
Error content: DLL load failed while importing cv2: The specified module cannot be found.
Prerequisite: opencv has been installed. I personally think that the best blog for the installation tutorial is this opencv installation . I installed it according to the steps.
After that, an error will be reported when python is imported, and the content is as follows:

insert image description here

This problem is super torturous, and the methods on the Internet are all kinds of strange. I tried it for a day and found that some dll files were missing. According to the method on the Internet, copy the dll files to the following directory 'C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\cv2' for
details The screenshot of the file is as follows:

insert image description here

The file address is as follows: After
the file address
is completed, the error problem is successfully solved!

insert image description here

Guess you like

Origin blog.csdn.net/weixin_46043195/article/details/123621417