OStack程序员社区-中国程序员成长平台

标题: python - 为 iOS 构建 OpenCV 失败 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-12 13:08
标题: python - 为 iOS 构建 OpenCV 失败

我从 GitHub 下载了 OpenCV 文件夹,并按照自述文件的说明为 ios 构建了它。 使用 python opencv/platforms/ios/build_framework.py ios 命令后出现以下错误:

Executing: ['cmake', '-GXcode', '-DAPPLE_FRAMEWORK=ON', '-DCMAKE_INSTALL_PREFIX=install', '-DCMAKE_BUILD_TYPE=Release', '-DIOS_ARCH=armv7', '-DCMAKE_TOOLCHAIN_FILE=/Users/name/Downloads/opencv/platforms/ios/cmake/Toolchains/Toolchain-iPhoneOS_Xcode.cmake', '-DENABLE_NEON=ON', '/Users/name/Downloads/opencv', '-DCMAKE_C_FLAGS=-fembed-bitcode', '-DCMAKE_CXX_FLAGS=-fembed-bitcode'] in /Users/name/Downloads/ios/build/build-armv7-iphoneos
============================================================
ERROR: [Errno 2] No such file or directory
============================================================
Traceback (most recent call last):
  File "opencv/platforms/ios/build_framework.py", line 112, in build
    self._build(outdir)
  File "opencv/platforms/ios/build_framework.py", line 104, in _build
    self.buildOne(t[0], t[1], mainBD, cmake_flags)
  File "opencv/platforms/ios/build_framework.py", line 186, in buildOne
    execute(cmakecmd, cwd = builddir)
  File "opencv/platforms/ios/build_framework.py", line 36, 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

我必须做些什么来修复它?



Best Answer-推荐答案


如果将来有人会遇到同样的问题。 这个问题在master分支,下载分支2.4并在PATH添加CMake构建过程顺利

关于python - 为 iOS 构建 OpenCV 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42646787/






欢迎光临 OStack程序员社区-中国程序员成长平台 (https://ostack.cn/) Powered by Discuz! X3.4