Error- module ‘cv2.cv2‘ has no attribute ‘wechat_qrcode_WeChatQRCode‘

运行下列代码报错: 

import cv2
detector = cv2.wechat_qrcode_WeChatQRCode()

错误为: AttributeError: module 'cv2.cv2' has no attribute 'wechat_qrcode_WeChatQRCode'

运行下列代码进行更新:

pip install opencv-python==4.5.2.52
pip install opencv-contrib-python==4.5.2.52

 

你可能感兴趣的:(Code-error)