title: How do I fix "RuntimeError: Unable to open shape_predictor_68_face_landmarks.dat" while using google colab?
body: <p>I am writing the following Python code in Google <a href="https://en.wikipedia.org/wiki/Project_Jupyter#Colaboratory" rel="nofollow noreferrer">Colaboratory</a> and get an error:</p>
  <p><strong>Code</strong>:</p>
  <pre><code>import cv2
  import dlib
  
  cap = cv2.VideoCapture(0)
  
  hog_face_detector = dlib.get_frontal_face_detector()
  
  dlib_facelandmark = dlib.shape_predictor(&quot;shape_predictor_68_face_landmarks.dat&quot;)
  
  while True: _,
  frame = cap.read()
  gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
  
  faces = hog_face_detector(gray)
  for face in faces:
  
      face_landmarks = dlib_facelandmark(gray, face)
  
      for n in range(0, 16):
          x = face_landmarks.part(n).x
          y = face_landmarks.part(n).y
          cv2.circle(frame, (x, y), 1, (0, 255, 255), 1)
  
  
  cv2.imshow(&quot;Face Landmarks&quot;, frame)
  
  key = cv2.waitKey(1)
  if key == 27:
      break
  cap.release()
  cv2.destroyAllWindows()
  </code></pre>
  <p><strong>Error</strong>:</p>
  <blockquote>
  <p>RuntimeError                              Traceback (most recent call last)
   in ()
  6 hog_face_detector = dlib.get_frontal_face_detector()
  7
  ----&gt; 8 dlib_facelandmark = dlib.shape_predictor(&quot;shape_predictor_68_face_landmarks.dat&quot;)
  9
  10 while True:</p>
  <p>RuntimeError: Unable to open shape_predictor_68_face_landmarks.dat</p>
  </blockquote>