title: cv2 has no attribute data
body: <p>The code is from a book which teaching OpenCV. I ran the code but it always showing error.</p>
  <pre><code>import cv2 
  casc_path = cv2.data.haarcascades + &quot;haarcascade_frontalface_default.xml&quot;
  faceCascade = cv2.CascadeClassifier(casc_path)
  faceCascade = cv2.CascadeClassifier(casc_path)
  faces = faceCascade.detectMultiScale(image, scaleFactor=1.1, minNeighbors=5, minSize=(30,30), flags = cv2.CASCADE_SCALE_IMAGE)
  imgheight=image.shape[0]
  imgwidth=image.shape[1] 
  cv2.rectangle(image, (10,imgheight-20), (110,imgheight), (0,0,0), -1)
  cv2.putText(image,&quot;Find &quot; + str(len(faces)) + &quot; face!&quot;, (10,imgheight-5), cv2.FONT_HERSHEY_SIMPLEX, 0.5, (255,255,255), 2)
  for (x,y,w,h) in faces:
      cv2.rectangle(image,(x,y),(x+w, y+h),(128,255,0),2)
  
  cv2.namedWindow(&quot;facedetect&quot;)
  cv2.imshow(&quot;facedetect&quot;, image)
  cv2.waitKey(0)  
  cv2.destroyWindow(&quot;facedetect&quot;)
  </code></pre>
  <p>And the error is here.</p>
  <pre><code>File &quot;K:/pyCharm_object/OpevCV.py&quot;, line 2, in &lt;module&gt;
  casc_path = cv2.data.harrcascades + &quot;harrcascade_frontalface_default.xml&quot;
  AttributeError: module 'cv2' has no attribute 'data'
  </code></pre>