Getting native python packages to cooperate with windows is always a lot of fun. I recently needed to use OpenCV with an up-to-date python installation on an windows 8 machine. Following steps worked fine in my case:
- Installing the 64 bit version of python 3.4 for windows (scroll down for the windows x86-64 MSI installer). During installation, add python to your path so you can use pip from your command line.
- Verify your python version by typing
python --version
into your command line. It should output Python3.4.x
, where x stands for any number. - Head to http://www.lfd.uci.edu/~gohlke/pythonlibs/ to find prebuild python packages for windows. Download OpenCV (opencv_python‑3.0.0‑cp34‑none‑win_amd64.whl) and its dependency NumPy (numpy‑1.9.2+unoptimized‑cp34‑none‑win_amd64.whl), both for 64 bit systems. “Cp34” stands for your python version 3.4.x.
- Install both files by running
pip install opencv_python‑3.0.0‑cp34‑none‑win_amd64.whl
andpip install numpy‑1.9.2+unoptimized‑cp34‑none‑win_amd64.whl
in your terminal. - Verify the installation: Type
python
into your command line to open the python console. Then typeimport cv2
and press enter. When there is no error message you can happily go on using OpenCV!