简体   繁体   English

由于 QTKit 导致 OpenCV 安装失​​败

[英]OpenCV Installation failure due to QTKit

I'm trying to install openCV for Python on my Mac but after going through a bunch of tutorials, none seem to work for me.我正在尝试在我的 Mac 上为 Python 安装 openCV,但是在经历了一堆教程之后,似乎没有一个对我有用。 These are the steps I took这些是我采取的步骤

  1. Installed CMake已安装的CMake
  2. Downloaded the OpenCV library下载了 OpenCV 库
  3. Used CMake to generate the Unix Makefiles使用CMake生成 Unix Makefile
  4. Run make on the generated files对生成的文件运行make

And this is where the error arises.这就是错误出现的地方。

fatal error: 'QTKit/QTKit.h' file not found致命错误:找不到“QTKit/QTKit.h”文件

I searched and I found QTKitDefines.h instead at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/QTKit.framework/Versions/A/Headers/我搜索并在/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/QTKit.framework/Versions/A/Headers找到了QTKitDefines.h /

Upon opening, it read打开后是这样写的

QTKit has been deprecated in 10.9. QTKit 已在 10.9 中弃用。 AVFoundation and AVKit are the frameworks recommended for all new development involving time-based audiovisual media on OS X. In order to transition your project from QTKit to AVFoundation please refer to: "Technical Note TN2300 Transitioning QTKit code to AV Foundation". AVFoundation 和 AVKit 是推荐用于 OS X 上所有涉及基于时间的视听媒体的新开发的框架。为了将您的项目从 QTKit 过渡到 AVFoundation,请参阅:“技术说明 TN2300 将 QTKit 代码过渡到 AV Foundation”。

I tried searching and nothing has deem fruitful.我尝试搜索,但没有任何成果。 All similar issues I found, the users still had QTKit.h .我发现所有类似的问题,用户仍然有QTKit.h Take for instance this folk就拿这个民间

Any help will sincerely be appreciated.任何帮助将不胜感激。

I found a workaround by downloading the QTKit framework from this repo then I simply merged my framework with the one included in the repo and continued with my installation process successfully.我通过从这个repo 下载 QTKit 框架找到了一种解决方法,然后我简单地将我的框架与 repo 中包含的框架合并,并成功地继续我的安装过程。

EDIT for Merging files编辑合并文件

By dragging and dropping the downloaded framework into the same location as my current QTKit framework;通过将下载的框架拖放到与我当前的 QTKit 框架相同的位置; since they both have the same name, a popup prompted me with three choices of either replacing , merging or cancel then I simply went for merging because this allows me to still keep my updated framework along with the repo one.由于它们都具有相同的名称,因此弹出窗口提示我选择替换合并取消三种选择,然后我只是进行合并,因为这使我仍然可以将更新的框架与回购框架一起保留。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM