开发者社区> 问答> 正文

OpenCV的Python-OS X

在OS X 10.5(英特尔)上构建OpenCV时,出现以下错误:

ld: warning in .libs/_cv_la-_cv.o, file is not of required architecture
ld: warning in .libs/_cv_la-error.o, file is not of required architecture
ld: warning in .libs/_cv_la-pyhelpers.o, file is not of required architecture
ld: warning in .libs/_cv_la-cvshadow.o, file is not of required architecture
ld: warning in ../../../cv/src/.libs/libcv.dylib, file is not of required architecture
ld: warning in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libcxcore.dylib, file is not of required architecture
Undefined symbols for architecture i386:
"_fputs$UNIX2003", referenced from:
  _PySwigObject_print in _cv_la-_cv.o
  _PySwigPacked_print in _cv_la-_cv.o
  _PySwigPacked_print in _cv_la-_cv.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
lipo: can't open input file: /var/folders/Sr/Srq9N4R8Hr82xeFvW3o-uk+++TI/-Tmp-//cchT0WVX.out (No such file or directory)
make[4]: *** [_cv.la] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

在运行./configure时-没有python,一切正常。另一个奇怪的事情是,当我使用Python 2.4.5或2.5.1时,一切都已经建立好了,切换到Python Framework 2.5.2之后出现了问题。

展开
收起
祖安文状元 2020-02-23 15:39:39 1573 0
3 条回答
写回答
取消 提交回答
  • OpenCV的下层是大量的C系代码,需要完整的GCC等依赖模块,请检查环境。

    2020-03-14 14:20:07
    赞同 展开评论 打赏
  • pip install opencv ,应该不需要在构建opencv

    2020-03-05 20:19:10
    赞同 展开评论 打赏
  • 链接时查找/Developer/SDKs/MacOSX10.4u.sdk时,警告不同的体系结构似乎有点奇怪-您能为我们提供有关构建环境的更多详细信息(XCode,GCC,Python,$ PATH版本)等等)

    另外,您有没有可用的OpenCV二进制文件?

    2020-02-23 15:39:44
    赞同 展开评论 打赏
问答分类:
问答标签:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
Python系列直播第一讲——Python中的一切皆对象 立即下载
From Python Scikit-Learn to Sc 立即下载
Improving Python and Spark Per 立即下载