install cv2 on python2 code example Example 1: python install cv2 pip install opencv-python Example 2: download cv2 pip3 install opencv-python for mac