我已经使用 CMake从这个文档安装了 OpenCV。我的 ~/.profile 文件是:
export DYLD_LIBRARY_PATH=/usr/local/mysql/lib/
export ARCHFLAGS="-arch i386 -arch x86_64"
export ARCHFLAGS="-arch i386"
export VERSIONER_PYTHON_PREFER_64_BIT=yes
export VERSIONER_PYTHON_PREFER_32_BIT=no
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
export PYTHONPATH=/Library/Python/2.6/site-packages:$PYTHONPATH
export DYLD_FALLBACK_LIBRARY_PATH=/opt/local/lib
我有import cv
这个错误:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.6/site-packages/cv.py", line 1, in <module>
from cv2.cv import *
ImportError: dlopen(/usr/local/lib/python2.6/site-packages/cv2.so, 2): no suitable image found. Did find:
/usr/local/lib/python2.6/site-packages/cv2.so: mach-o, but wrong architecture
我的python架构:
file "$( "$(which python)" -c "import sys;print(sys.executable)" )"
/usr/bin/python: Mach-O universal binary with 3 architectures
/usr/bin/python (for architecture x86_64): Mach-O 64-bit executable x86_64
/usr/bin/python (for architecture i386): Mach-O executable i386
/usr/bin/python (for architecture ppc7400): Mach-O executable ppc
我已阅读并运行 stackoverflow 中有关 OpenCV 和 Leopard 的所有答案,但仍高于错误。对此的任何帮助将不胜感激。
提前致谢