AttributeError:模块“cv2.cv2”没有属性“cv”

2024-06-30 16:14:32 发布

您现在位置:Python中文网/ 问答频道 /正文

我想我对windows系统或python 3.6版本有一些问题。我面临一些属性错误。我已经检查了我的代码,并再次检查,没有错误,我也比较了我的代码与其他人,我看到没有错误。那我为什么要面对这种错误。我在这里添加代码:

recognizer module

我面临以下错误。

C:\Users\MAN\AppData\Local\Programs\Python\Python36\python.exe C:/Users/MAN/PycharmProjects/facerecognition/Recognise/recognizerr.py Traceback (most recent call last): File "C:/Users/MAN/PycharmProjects/facerecognition/Recognise/recognizerr.py", line 11, in font = cv2.cv.InitFont(cv2.cv.CV_FONT_HERSHEY_SIMPLEX, 1, 1, 0, 1, 1) AttributeError: module 'cv2.cv2' has no attribute 'cv'

Process finished with exit code 1

这是Windows问题,还是在Python3.6版本中只显示错误? 我正在Windows平台上使用Python 3.6。


Tags: 代码py版本windows系统错误cv2users