我一直按照这里的说明进行操作:http://opencv.willowgarage.com/wiki/Mac_OS_X_OpenCV_Port,刚刚完成make -j8步骤。虽然make完成了100%,但我收到了错误
make[2]: *** [interfaces/python/CMakeFiles/cvpy.dir/cv.o] Error 1
make[1]: *** [interfaces/python/CMakeFiles/cvpy.dir/all] Error 2
make: *** [all] Error 2
我在堆栈跟踪中看到的特定错误都来自名为cv.cpp的文件:
/other/open_cv/opencv/opencv/interfaces/python/cv.cpp:18: error: ‘Py_ssize_t’ does not name a type
/other/open_cv/opencv/opencv/interfaces/python/cv.cpp:206: error: ‘Py_ssize_t’ does not name a type
/other/open_cv/opencv/opencv/interfaces/python/cv.cpp: In function ‘PyObject* iplimage_tostring(PyObject*, PyObject*)’:
/other/open_cv/opencv/opencv/interfaces/python/cv.cpp:282: error: ‘what_size’ was not declared in this scope
/other/open_cv/opencv/opencv/interfaces/python/cv.cpp: In function ‘PyObject* cvmat_tostring(PyObject*, PyObject*)’:
/other/open_cv/opencv/opencv/interfaces/python/cv.cpp:425: error: ‘what_size’ was not declared in this scope
(持续了很长时间)。我遵循了所有步骤,不知道我哪里出错了。有关在我的mac(Snow Leopard)上安装open cv的任何帮助吗?
谢谢!
答案 0 :(得分:1)
我有一个旧版本的python(MacPython覆盖了默认的python版本)。只需摆脱MacPython,你就可以了。
答案 1 :(得分:0)
确保您拥有存储库中最新的svn
我无法建立tar球,但是svn检查正确建造了
“https://code.ros.org/svn/opencv/trunk/opencv”
您还需要使用OpenCV.framework for xcode来构建应用程序。
我发现这个页面有最好的信息让openCV在Mac上工作
http://opencv.willowgarage.com/wiki/Mac_OS_X_OpenCV_Port
到目前为止,我只能在基于英特尔的Mac上工作。