Skip to content

Windows Environment Setup

Paul edited this page May 16, 2013 · 15 revisions

Tested with:

  • Windows 7
  • Windows 8

Python, Numpy, OpenCV, and PIL

  1. Download and install Python 2.7.*. Leave install path default (root).
    • Make sure it is the regular 32-bit Windows installer (X86, not X86-64), EVEN IF YOU ARE RUNNING 64-bit OS
  • Download and install Numerical Python 1.6.1. It should automatically find your Python27 install directory
  • Download OpenCV-2.4.*
    • Run the downloaded self-extracting file and enter C:\opencv as the path
    • Open the OpenCV folder you just extracted and navigate to opencv\build\python\x86\2.7\. You will find a file called cv2.pyd
    • Copy cv2.pyd to C:\Python27\Lib\site-packages\
  • Run IDLE (Python GUI) from start menu to open the Python Shell
  • Type import cv2 in the Python Shell
  • Download and install the Python Imaging Library. It should find python27 installation automatically.

Setting an environment variable

  1. Go to Control Panel >> System
  • Click Advanced system settings
  • Click Environment Variables...
  • Under User variables for <user>, click New...
  • Variable name: PYTHONPATH. Variable value: C:\opencv;
  • Click OK

Git

Installation

Download and install Git. Leave all options default and keep clicking next.

Running Git

  • Run Git Bash from start menu.

See Also