gpt4 book ai didi

ios - OPENCV iOS安装

转载 作者:可可西里 更新时间:2023-11-01 03:25:09 25 4
gpt4 key购买 nike

I am installing the opencv in my system followings the command given by open cv http://docs.opencv.org/2.4/doc/tutorials/introduction/ios_install/ios_install.html I am getting this error Please let me know what I am missing.

anil-Mac-2s-Mac-mini:opencv pws-mac-2$ python platforms/ios/build_framework.py ios
Executing: ['cmake', '-GXcode', '-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_TOOLCHAIN_FILE=/Users/pws-mac-2/Desktop/opencv/platforms/ios/cmake/Toolchains/Toolchain-iPhoneOS_Xcode.cmake', '-DCMAKE_INSTALL_PREFIX=install', '-DENABLE_NEON=ON', '/Users/pws-mac-2/Desktop/opencv', '-DCMAKE_C_FLAGS=-fembed-bitcode', '-DCMAKE_CXX_FLAGS=-fembed-bitcode'] in /Users/pws-mac-2/Desktop/opencv/ios/build/armv7-iPhoneOS

============================================================
ERROR: [Errno 2] No such file or directory
============================================================
Traceback (most recent call last):
File "platforms/ios/build_framework.py", line 183, in <module>
b.build(args.out)
File "platforms/ios/build_framework.py", line 87, in build
self.buildOne(t[0], t[1], mainBD, cmake_flags)
File "platforms/ios/build_framework.py", line 105, in buildOne
execute(cmakecmd, cwd = builddir)
File "platforms/ios/build_framework.py", line 34, in execute
retcode = check_call(cmd, cwd = cwd)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 535, in check_call
retcode = call(*popenargs, **kwargs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 522, in call
return Popen(*popenargs, **kwargs).wait()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

我收到此错误请告诉我如何解决。 . .

最佳答案

发生此错误是因为 cmake (a) 未安装或 (b) 不在用户路径上。

在这种情况下,OP 下载了 cmake gui 应用程序 from cmake.org ,并将其复制到 /Applications。此应用不会自动添加二进制文件的路径,这就是脚本找不到 cmake 的原因。

通过将路径添加到 cmake 二进制文件(bash 语法):

PATH=$PATH:/Applications/CMake.app/Contents/bin

OP 能够成功构建 opencv。

大多数包管理器 - 例如homebrewmacports谁会自动向用户的配置文件添加一个路径,该路径将允许它运行而无需再修改路径。

关于ios - OPENCV iOS安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34328123/

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