ImportError: Bindings generation error. Submodule name should always start with a parent module name. Parent name: cv2.cv2. Submodule name: cv2
python版本与opencv-python版本不匹配造成
先卸载原先的库
pip uninstall numpy
pip uninstall opencv-python
pip uninstall opencv-contrib-python
升级pip模块
pip install --upgrade pip
安装wheel和numpy包
(wheel 包是一种类似于zip 格式的文件,此次安装wheel 模块,是为了后面安装whl文件 做准备)
pip install wheel
pip install numpy
https://www.lfd.uci.edu/~gohlke/pythonlibs/
然后进行安装
pip install F:\opencv_python-4.5.5-cp39-cp39-win_amd64.whl
5、安装opencv-contrib-python,版本与上面opencv-python相同
pip install opencv-contrib-python==4.5.5
报错,没有这个版本,那就从下面两个选一个
我用的第一个,成功了
pip install opencv-contrib-python==4.5.5.62
来源地址:https://blog.csdn.net/m0_73767377/article/details/130072986