环境是:
Python 3.6
opencv-python-3.4.4.19
缺少了一个安装包
解决办法:
1.补一个包 opencv-contrib-python
pip3 install opencv-contrib-python
Collecting opencv-contrib-python
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/ba/0d/40121ed697f6105b9ffafc0e455e955ba8cbff2dda239cf188d24525be5b/ope
ncv_contrib_python-4.1.1.26-cp36-cp36m-win_amd64.whl (45.4MB)
|████████████████████████████████| 45.4MB 1.3MB/s
Requirement already satisfied: numpy>=1.11.3 in c:\users\administrator.gj4o9wsk2iqfb8r\appdata\local\programs\python\python36\l
ib\site-packages (from opencv-contrib-python) (1.16.3)
Installing collected packages: opencv-contrib-python
Successfully installed opencv-contrib-python-4.1.1.26
若还报同样错,可以降低opencv-python版本试试
Reference:
https://blog.youkuaiyun.com/weixin_43167047/article/details/82841750