2010-02-17 94 views
0

我一直在按照此處的說明進行操作:http://opencv.willowgarage.com/wiki/Mac_OS_X_OpenCV_Port,並剛剛完成make -j8步驟。雖然做完成100%,我得到錯誤在我的Mac上構建OpenCV時出現錯誤:'Py_ssize_t'問題

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(雪豹)安裝打開cv?

謝謝!

回答

1

我有一個老版本的python(MacPython覆蓋了默認的python版本)。只要擺脫MacPython,你就可以走了。

+0

「擺脫MacPython」究竟意味着什麼? – sigfpe 2011-08-12 22:50:15