Run the program like this:
python webcam_cv3.py
Update: Now supports OpenCV3. This change has been made by furetosan ( https://github.com/ARHASSANI) and tested on Linux.
To run the OpenCV3 version, run python webcam_cv3.py haarcascade_frontalface_default.xml
Press c to capture and see the emotion Press q to exit