1. <tfoot id='iR1a5'></tfoot>

    • <bdo id='iR1a5'></bdo><ul id='iR1a5'></ul>
  2. <i id='iR1a5'><tr id='iR1a5'><dt id='iR1a5'><q id='iR1a5'><span id='iR1a5'><b id='iR1a5'><form id='iR1a5'><ins id='iR1a5'></ins><ul id='iR1a5'></ul><sub id='iR1a5'></sub></form><legend id='iR1a5'></legend><bdo id='iR1a5'><pre id='iR1a5'><center id='iR1a5'></center></pre></bdo></b><th id='iR1a5'></th></span></q></dt></tr></i><div id='iR1a5'><tfoot id='iR1a5'></tfoot><dl id='iR1a5'><fieldset id='iR1a5'></fieldset></dl></div>

      <small id='iR1a5'></small><noframes id='iR1a5'>

      <legend id='iR1a5'><style id='iR1a5'><dir id='iR1a5'><q id='iR1a5'></q></dir></style></legend>

      PyQt5 和 OpenCV 有类似的库;如何避免两者之间的冲

      时间:2023-08-05

        <i id='4pmqj'><tr id='4pmqj'><dt id='4pmqj'><q id='4pmqj'><span id='4pmqj'><b id='4pmqj'><form id='4pmqj'><ins id='4pmqj'></ins><ul id='4pmqj'></ul><sub id='4pmqj'></sub></form><legend id='4pmqj'></legend><bdo id='4pmqj'><pre id='4pmqj'><center id='4pmqj'></center></pre></bdo></b><th id='4pmqj'></th></span></q></dt></tr></i><div id='4pmqj'><tfoot id='4pmqj'></tfoot><dl id='4pmqj'><fieldset id='4pmqj'></fieldset></dl></div>

          <small id='4pmqj'></small><noframes id='4pmqj'>

          • <tfoot id='4pmqj'></tfoot>
            • <legend id='4pmqj'><style id='4pmqj'><dir id='4pmqj'><q id='4pmqj'></q></dir></style></legend>
                <tbody id='4pmqj'></tbody>
                <bdo id='4pmqj'></bdo><ul id='4pmqj'></ul>
              • 本文介绍了PyQt5 和 OpenCV 有类似的库;如何避免两者之间的冲突?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                我在同一个 conda 虚拟环境中拥有 PyQt5 和 OpenCV.

                I have PyQt5 and OpenCV in the same conda virtual environment.

                opencv-python==3.4.1.15    
                PyQt5==5.10.1    
                

                每当我运行我的 PyQt5 应用程序时,都会收到许多类似这样的警告:

                Whenever I run my PyQt5 app, I get many warnings like these:

                objc[7992]: Class QCocoaPageLayoutDelegate is implemented in both /Users/alexryan/miniconda3/envs/qacker/lib/python3.5/site-packages/cv2/.dylibs/QtGui (0x109ae0290) and /Users/alexryan/miniconda3/envs/qacker/lib/python3.5/site-packages/PyQt5/Qt/lib/QtPrintSupport.framework/Versions/5/QtPrintSupport (0x10a387f20). One of the two will be used. Which one is undefined.
                objc[7992]: Class QCocoaPrintPanelDelegate is implemented in both /Users/alexryan/miniconda3/envs/qacker/lib/python3.5/site-packages/cv2/.dylibs/QtGui (0x109ae0308) and /Users/alexryan/miniconda3/envs/qacker/lib/python3.5/site-packages/PyQt5/Qt/lib/QtPrintSupport.framework/Versions/5/QtPrintSupport (0x10a387f70). One of the two will be used. Which one is undefined.    
                objc[7992]: Class QCocoaApplicationDelegate is implemented in both /Users/alexryan/miniconda3/envs/qacker/lib/python3.5/site-packages/cv2/.dylibs/QtGui (0x109ae0010) and /Users/alexryan/miniconda3/envs/qacker/lib/python3.5/site-packages/PyQt5/Qt/plugins/platforms/libqcocoa.dylib (0x10c6ed480). One of the two will be used. Which one is undefined.    
                objc[7992]: Class QNSApplication is implemented in both /Users/alexryan/miniconda3/envs/qacker/lib/python3.5/site-packages/cv2/.dylibs/QtGui (0x109adffc0) and /Users/alexryan/miniconda3/envs/qacker/lib/python3.5/site-packages/PyQt5/Qt/plugins/platforms/libqcocoa.dylib (0x10c6ed4d0). One of the two will be used. Which one is undefined.    
                objc[7992]: Class QCocoaMenuLoader is implemented in both /Users/alexryan/miniconda3/envs/qacker/lib/python3.5/site-packages/cv2/.dylibs/QtGui (0x109adff70) and /Users/alexryan/miniconda3/envs/qacker/lib/python3.5/site-packages/PyQt5/Qt/plugins/platforms/libqcocoa.dylib (0x10c6ed570). One of the two will be used. Which one is undefined.    
                objc[7992]: Class QNSImageView is implemented in both /Users/alexryan/miniconda3/envs/qacker/lib/python3.5/site-packages/cv2/.dylibs/QtGui (0x109ae0330) and /Users/alexryan/miniconda3/envs/qacker/lib/python3.5/site-packages/PyQt5/Qt/plugins/platforms/libqcocoa.dylib (0x10c6ed660). One of the two will be used. Which one is undefined.    
                objc[7992]: Class QNSStatusItem is implemented in both /Users/alexryan/miniconda3/envs/qacker/lib/python3.5/site-packages/cv2/.dylibs/QtGui (0x109ae0380) and /Users/alexryan/miniconda3/envs/qacker/lib/python3.5/site-packages/PyQt5/Qt/plugins/platforms/libqcocoa.dylib (0x10c6ed6b0). One of the two will be used. Which one is undefined.    
                objc[7992]: Class QNSOpenSavePanelDelegate is implemented in both /Users/alexryan/miniconda3/envs/qacker/lib/python3.5/site-packages/cv2/.dylibs/QtGui (0x109ae0150) and /Users/alexryan/miniconda3/envs/qacker/lib/python3.5/site-packages/PyQt5/Qt/plugins/platforms/libqcocoa.dylib (0x10c6ed750). One of the two will be used. Which one is undefined.
                

                处理这个问题的适当方法是什么?

                What is the appropriate way to handle this?

                推荐答案

                我通过GUI卸载opencv并安装headless版本解决了这个问题:

                I solved the problem by uninstalling opencv with the GUI and installing the headless version:

                pip 卸载 opencv-contrib-python

                pip uninstall opencv-contrib-python

                pip install opencv-contrib-python-headless

                pip install opencv-contrib-python-headless

                opencv 中的 namedWindow 函数仍然有效.

                The namedWindow function in opencv still works.

                这篇关于PyQt5 和 OpenCV 有类似的库;如何避免两者之间的冲突?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:在 QGraphicsView 中播放图像序列(神秘的内存泄漏 下一篇:PyQt5 Designer 不工作:此应用程序无法启动,因为无

                相关文章

                最新文章

                1. <i id='BUAXq'><tr id='BUAXq'><dt id='BUAXq'><q id='BUAXq'><span id='BUAXq'><b id='BUAXq'><form id='BUAXq'><ins id='BUAXq'></ins><ul id='BUAXq'></ul><sub id='BUAXq'></sub></form><legend id='BUAXq'></legend><bdo id='BUAXq'><pre id='BUAXq'><center id='BUAXq'></center></pre></bdo></b><th id='BUAXq'></th></span></q></dt></tr></i><div id='BUAXq'><tfoot id='BUAXq'></tfoot><dl id='BUAXq'><fieldset id='BUAXq'></fieldset></dl></div>
                2. <legend id='BUAXq'><style id='BUAXq'><dir id='BUAXq'><q id='BUAXq'></q></dir></style></legend>
                  • <bdo id='BUAXq'></bdo><ul id='BUAXq'></ul>

                    <tfoot id='BUAXq'></tfoot>
                  1. <small id='BUAXq'></small><noframes id='BUAXq'>