AttributeError: module 'cv2.cv2' has no attribute 'cv'


I think I have some issues with the windows system or python 3.6 version. I am facing some attribute error. I have checked and double checked my code and there is no error and i also compare my code to others and i have seen there is no error. then why i am facing this kind of error. I am adding my code here:

recognizer module

and i am facing following error.

Traceback (most recent call last): File
line 11, in
font =, 1, 1, 0, 1, 1) AttributeError: module ‘cv2.cv2’ has no attribute ‘cv’

Process finished with exit code 1

Is this the Windows issue or it shows only error in Python 3.6 version?
for you kind information I am using Python 3.6 in Windows platform.

Asked By: Manjurul Ahsan



in Opencv3 the cv module is deprecated. So, in line 11 you can initialize the font like following:

Answered By: Nuhil Mehdy

font =

I worked on different variable (CV_CAP_PROP_FRAME_WIDTH), and it took me soo long to understand that you also need to remove the "CV_".

Answered By: Yam Shargil

Worked for me with
as the best answer suggested.

Answered By: A.Salim
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.