This is the code I wrote when learning to use OpenCV from https://www.youtube.com/watch?v=Z78zbnLlPUA&list=PLQVvvaa0QuDdttJXlLtAJxJetJcqmqlQq
Here are the instructions I followed: http://docs.opencv.org/2.4/doc/tutorials/introduction/linux_install/linux_install.html#linux-installation
Run: pip install requirements.txt
I am using Python 3.6