打开CV iOS安装 [英] OPEN CV iOS installation
问题描述
我在我的系统中安装opencv如下命令open cv http://docs.opencv.org/2.4/doc/tutorials/introduction/ios_install/ios_install.html
我收到此错误请告诉我我错过了什么。
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
我收到此错误请告诉我如何解决。 。 。
I am getting this error Please let me know how to resolve . . .
推荐答案
发生此错误是因为 cmake
是(a)不是安装或(b)不在用户的路径上。
This error happens because cmake
is either (a) not installed or (b) not on the user's path.
在这种情况下,OP已经下载了 cmake
gui应用程序来自cmake.org ,并将其复制到 / Applications
。此应用程序不会自动添加二进制文件的路径,这就是脚本无法找到 cmake
的原因。
In this case, the OP had downloaded the cmake
gui application from cmake.org, and copied it to /Applications
. This app doesn't add the path to the binaries automatically, which is why the script couldn't find cmake
.
通过添加cmake二进制文件的路径(bash语法):
By adding the path to the cmake binaries (bash syntax):
PATH=$PATH:/Applications/CMake.app/Contents/bin
OP能够成功构建opencv。
the OP was able to successfully build opencv.
大多数包裹经理 - 例如自制软件或 macports 会自动为用户添加路径允许它运行而不必再修改路径的配置文件。
Most package managers - e.g. homebrew or macports whould have automatically added a path to the user's profile that would have permitted it to run without having to modify the path any more.
这篇关于打开CV iOS安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!