gpt4 book ai didi

build - 在我的Mac上构建OpenCV时出错: 'Py_ssize_t'问题

转载 作者:行者123 更新时间:2023-12-02 17:55:51 27 4
gpt4 key购买 nike

我一直在遵循这里的指示信息:http://opencv.willowgarage.com/wiki/Mac_OS_X_OpenCV_Port,并且刚刚完成了make -j8步骤。尽管制作完成了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有帮助吗?

谢谢!

最佳答案

我有一个旧版本的python(MacPython覆盖了默认的python版本)。只需摆脱MacPython,一切就好了。

关于build - 在我的Mac上构建OpenCV时出错: 'Py_ssize_t'问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2278669/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com