How to install openCV 3.x for use with python 3.x in Windows 10

asked 2016-01-03 00:15:31 -0500

Lamar Latrell gravatar image

updated 2016-01-03 00:16:52 -0500

Is there a 'for dummies' list of instructions to install openCV 3.x for use with Python 3.x on Windows 10?

A Hello-World of sorts? The OpenCV site doesn't appear to have one.

I am happy to use whatever IDE but as I have used Sublime Text 2 I would prefer to keep doing so.

I have spent quite a bit of time developing a reasonably complex and succesful C++ 2.* openCV application in Visual Studio and managed (with some effort) to get that development environment working for me, but when it comes to cmake/builds/github/source/compilers and all the configurations required for Python I am facing too many free variables and unknowns (and my own ignorance regarding these things).

In all the tutorials, SE Q&A and other internet dialog I've discovered there is jargon heavy and includes missed steps and assumed knowledge.

Potentially irrelevant info (??) follows:

http://stackoverflow.com/questions/26... looks good, but cmake is complaining:

"CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles". CMAKE_MAKE_PROGRAM is not set."

Which is probably something to do with my selection of 'Sublime Text 2 - minGW' in 'configure'. Maybe not, no idea, the answer given doesn't suggest which option I'm meant to chose and why...

edit retag flag offensive close merge delete

Comments

1

you will have to rebuild the opencv libs from src to build the python3 bindings. if you have visual studio, please use that, not mingw.

try again, whwn in trouble, append the cmake output to your question.

berak gravatar imageberak ( 2016-01-03 02:12:37 -0500 )edit

rebuild ? bindings? (I'm a dummy) ... This is a fresh install on a new machine, I can get Visual Studio again but wasn't aware it could be used with Python. I wasn't attempting to use mingw, I have no idea what that is, it was just the first option (of 4) in the Sublime Text 2 options in cmake ... So, ok, I'll just keep bashing away and see what happens...

Lamar Latrell gravatar imageLamar Latrell ( 2016-01-04 02:54:00 -0500 )edit

there should be a cmake generator for the visual studio version you're using, please choose that.

cmake will generate a opencv.sln, just open it, switch to release mode, and build the INSTALL project.

berak gravatar imageberak ( 2016-01-04 03:06:07 -0500 )edit

there should be a cmake generator for the visual studio version you're using, please choose that.

if all works well, cmake will generate a opencv.sln, just open it, switch to release mode, and build the INSTALL project.

berak gravatar imageberak ( 2016-01-04 03:06:30 -0500 )edit

installed it with python 2.7 after (finally) finding: https://opencv-python-tutroals.readth...

Lamar Latrell gravatar imageLamar Latrell ( 2016-01-05 18:11:55 -0500 )edit