OpenCV, Python (ctypes), and OS X 10.5: dylib errors/confusion
Posted
by Jeff
on Stack Overflow
See other posts from Stack Overflow
or by Jeff
Published on 2010-05-28T03:32:40Z
Indexed on
2010/05/28
3:41 UTC
Read the original article
Hit count: 382
I have tried two brands of ctypes (ctypes-opencv and another) wrappers for OpenCV (2.0 from svn head), can use Python and OpenCV in the Python console, but whenever I try to import the packages (from ctypes_opencv import *) from another Python file, I get the following error message:
OSError: dlopen(/usr/local/lib/libcv.dylib, 6): Symbol not found: __ZN2cv10fastMallocEm Referenced from: /usr/local/lib/libcv.dylib Expected in: flat namespace
And some more Python errors:
module body in __init__.py at line 18
from ctypes_opencv.cxcore import *
module body in cxcore.py at line 80
_cxDLL, _cvDLL, _hgDLL = detect_opencv()
function detect_opencv in cxcore.py at line 59
cvDLL = cdll.LoadLibrary(find_lib('cv'))
function LoadLibrary in __init__.py at line 431
return self._dlltype(name)
function __init__ in __init__.py at line 353
self._handle = _dlopen(self._name, mode)
I most recently built OpenCV using flags the ctypes_opencv wiki recommended: ENABLE_SSE(2) OFF and BUILD_NEW_PYTHON_SUPPORT OFF. I've tried a number of flag combinations though. I also tried using the MacPorts install of OpenCV, got the same messages, uninstalled it, and now it errors out as well. :P And if that wasn't enough, I tried using the latest ctypes wrapper, but get boost-jam errors.
Any help would be very much appreciated.
© Stack Overflow or respective owner