Skip to content Skip to sidebar Skip to footer

No Module Named Cv

I'm trying to run this script: https://github.com/openalpr/train-detector/blob/master/crop_plates.py I've never dealt with python before. First of all I had some syntax errors in t

Solution 1:

For ImportError: No module named cv, try installing opencv-python module using below command:

pip install opencv-python

Solution 2:

cv2.cv doesn't exists in OpenCV 3.0. Use simply cv2

Also, the attribute is no more CV_HOUGH_GRADIENT but HOUGH_GRADIENT

So what you looking for is probably:

cv2.HOUGH_GRADIENT

Solution 3:

OK , I searched for a while and find the following :


Solution 4:

It seems this code is using a old version of OpenCV. Unfortunately there is no mention of the exact version they used in their repo.

As the code is at least 2 years old, I would install opencv version 2.4.

pip install opencv-python==2.4


Post a Comment for "No Module Named Cv"