我想我对windows系统或python 3.6版本有一些问题。我面临一些属性错误。我已经检查了我的代码,并再次检查,没有错误,我也比较了我的代码与其他人,我看到没有错误。那我为什么要面对这种错误。我在这里添加代码:
我面临以下错误。
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。
在Opencv3中,不推荐使用
cv
模块。因此,在第11行中,您可以如下初始化字体:相关问题 更多 >
编程相关推荐