NumesSanguis
NumesSanguis

Reputation: 6282

Building OpenCV 3.0.0-beta Windows Python 3.4

I wish to get OpenCV working on my Windows 7 x64 for Python 3.4. Even though the OpenCV 3 Alpha page states that there is Python 3 support (http://opencv.org/opencv-3-0-alpha.html), the pre-compiled package only contains opencv/build/python/2.7 and no 3(.4).

So following the answer on How to use OpenCV in python 3.4 on windows 7 x64?, I'm trying to build OpenCV 3.0.0 from source following the following tutorial: http://docs.opencv.org/doc/tutorials/introduction/windows_install/windows_install.html.

However since this tutorial is a bit outdated, I've some problems following certain steps.

Any help is greatly appreciated (or a link to a compiled Python 3.4 cv2.pyd)

opencv.org: http://answers.opencv.org/question/60190/building-opencv-300-beta-windows-python-34/

Upvotes: 1

Views: 2260

Answers (1)

Michael B. Currie
Michael B. Currie

Reputation: 14636

I share precisely your frustrations. Ridiculous of a major package to demand that its users jump through so many hoops, building it from source, simply to use it as an import cv2 in Python. My other packages I just install in one line from pip!

The ticket on the OpenCV bug tracker documenting progress on having a compiled Python 3.4 cv2.pyd file included in the OpenCV 3.0 download on the OpenCV site. As of 6 June 2015 it's not there yet.

However, the great news is, Christoph Gohlke maintains Windows binaries for many Python packages, including OpenCV 3.0 with Python 3.x bindings! See here:

http://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv

To install, just download the 64-bit or 32-bit .whl file appropriate for your system, then run pip install [filename]. Then the instruction import cv2 should work in your Python 3.x interpreter.

Upvotes: 2

Related Questions