After cloning the GitHub repo of OpenCV, I am trying to run but I am getting error : Traceback (most recent call last): File "", line 114, in img = cv.imread(cv.samples.findFile(filename)) AttributeError: module 'cv2.cv2' has no attribute 'samples'

Here is the link to the file:

1 Answers

Safwan On Best Solutions

samples submodule is available in opencv-python version Use pip install to install that specific version.

pip install opencv-python==