Face-and-eyes-detection-with-OpenCV Output on live Webcam: Before running, change your directory to where haarcascade_frontalface_default.xml is located in your system. import os os.chdir('../location/of/your/file/directory/haarcascade_frontalface_default.xml) Run faceDetection.py