1
votes

I have installed opencv 3.4.0 and python 3.6.4 and pycharm. In pycharm I installed the numpy package. To add the python to pycharm, I copied the cv2.pyd file from the opencv to the python directory (in the DLLs folder and the site-packages folder). I get this error for the import cv2 line when I run the project: ImportError: DLL load failed: The specified module could not be found.

In the opencv folder, under python there is only a folder for 2.7, If this is the problem what could I do? I need to use a 3.+ version of python.

1

1 Answers

0
votes

This can happen if you are using windows 10 N distribution, the N distributions does not come pre installed with windows media feature pack, which is required after OpenCV version 3.4 and onwards.

The preferred solution is to install the feature pack at : https://www.microsoft.com/en-us/software-download/mediafeaturepack

Be careful to choose the version that works with your current version of windows.

If that is not an option, fall back to an earlier version of OpenCV that does not have dll dependencies, you can do that by:pip install opencv-python=3.3.0.9

If the problem still persists try using Dependency walker to find out where specifically your problems stem from and then try fixing them individually.

Since windows rolled out it's N version this problem has been seen at many places, and has many impacts across the windows environment, the fastest way to identify if you have this problem is open youtube in Edge browser, if it says HTML5 media plugin not found, this is the problem.

That should sort the problem, if it doesn't feel free to comment and maybe I can help more.