Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

So after a little bit of headaches, it worked for me :). Below is summary of what I did.

  1. A new git clone of the official OpenCV repo. (as mentioned by @berak in his comments) (It didn't make any change).
  2. Used Visual Studio 2012 (instead of 2010).
  3. Reinstalled Python and Numpy.

Explanation

I tried building with 2.4 branch. It worked fine. So I thought problem may be with master branch.

I cloned the repo to a new folder and tried CMake on it. But still BUILD_opencv_python is missing. So I don't think that was the issue. And thanks to @berak and @Alexander Mordvintsev for making sure there is no issue in their system. (That means problem is inside my system, not repo).

Then I started to reinstall everything. I changed VS2010 to VS2012.

I installed Python 64-bit, but later I knew there is no official binary of Numpy for 64 bit and I need to compile it from source or pip install. But both require the same exact version of VStudio used for compiling Python, which is VS2008. ( I don't want to download and install it again).

So I reverted to Python 2.7.3-32bit and Numpy-win32-py27-superpack.

Now I tried CMake and everything works fine. I am not sure what solved the problem, whether VS2012 or Python reinstall or something else (because with the same old setup, 2.4 branch worked fine).

If anyone gets any idea what happened here, feel free to share. !!!