Has anyone ever had OpenCV work with Python 2.7 on MacOS 10.6?
Posted
by
?????
on Stack Overflow
See other posts from Stack Overflow
or by ?????
Published on 2011-01-02T08:19:58Z
Indexed on
2011/01/02
18:53 UTC
Read the original article
Hit count: 196
I've been trying on and off for the past 6 months to get OpenCV to work with Python on MacOS. Every time there's a new release, I try again and fail. I've tried both 64-bit and 32-bit, and both the xcode gcc and gcc installed via macports.
I just spend the past two days on it, hopeful that the latest OpenCV release, that appears to include Python support directly would work. It doesn't.
I've also tried and failed to use this: http://code.google.com/p/pyopencv/
I've been using OpenCV with C++ or Microsoft C++/CLI for the past few years, but I'd love to use it with Python on a Mac because that is my primary development environment.
I'd love to hear from anyone who's actually been able to get the opencv python examples to run under Mac OS 10.6, either 32 or 64-bit.
My last attempt was to follow the instructions on this page
http://recursive-design.com/blog/2010/12/14/face-detection-with-osx-and-python/
with a clean, fresh install of 10.6 on a 64-bit capable Mac.
My PYTHONPATH is set, and I can see the cv library in it. But an "import cv" from python fails.
Previously, the closest I've ever gotten (again, staring on a clean, fresh 10.6 install) was this:
Python 2.7.1 (r271:86882M, Nov 30 2010, 10:35:34)
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv
Fatal Python error: Interpreter not initialized (version mismatch?)
Abort trap
thrilllap-2:~ swirsky$
I've seen a lot of folks answering similar questions here, but have never seen an definitive answer for it.
© Stack Overflow or respective owner