How to remove the error : "ImportError: DLL load failed: The specified module could not be found." while importing cv2 in jupyter notebook

How to remove the error : "ImportError: DLL load failed: The specified module could not be found." while importing cv2 in jupyter notebook

我已经通过

安装了 opencv-python

pip install opencv-contrib-python

我的设备上还安装了 python 3.7.2(Windows 10)

在导入 cv2 时,显示如下:

ImportError: DLL load failed: The specified module could not be found.

我什至检查了 anaconda3 中的 python3.dll 文件,文件夹就在那里。

请提出一些成功导入的方法。

假设您确实需要 contrib 模块,对于您指定的错误,

试试这个:

1. make sure you have Visual C++ redistributable 2015 installed. If you are using older Windows version than Windows 10 and latest system updates are not installed, Universal C Runtime might be also required.

pip 上的 Contrib 文档明确提到这是作为先决条件安装的。

2. If you still encounter the error after you have checked all the previous solutions, download Dependencies and open the cv2.pyd (located usually at C:\Users\username\AppData\Local\Programs\Python\PythonXX\Lib\site-packages\cv2) file with it to debug missing DLL issues.

Dependencies.

再失败就用第二种方案

Post 如果可行,请在评论部分告诉我,并接受此作为解决方案,否则请告诉我。