I have always struggled when trying to set up OpenCV for Python before. So I decide to write this post to help myself in the future and share with you =). My setup is for OpenCV 2.2 but I think you can apply for any version of OpenCV.

Step 1: Download and install Python 2.7 from Python site. You need to install the 32bit version of Python. OpenCV currently does not work with Python 64bit.

Step 2: Download and install OpenCV 2.2 from OpenCV Sourceforge. Note that this version only supports Python 2.7 (not 3.x).