<legend id='5u33b'><style id='5u33b'><dir id='5u33b'><q id='5u33b'></q></dir></style></legend>

      <tfoot id='5u33b'></tfoot>

    1. <small id='5u33b'></small><noframes id='5u33b'>

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

        macOS Big Sur 11.0.1 上未弹出应用程序

        时间:2023-08-05

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

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

                <tfoot id='zFgQo'></tfoot>
                  <tbody id='zFgQo'></tbody>
                  <bdo id='zFgQo'></bdo><ul id='zFgQo'></ul>
                  <legend id='zFgQo'><style id='zFgQo'><dir id='zFgQo'><q id='zFgQo'></q></dir></style></legend>

                  本文介绍了macOS Big Sur 11.0.1 上未弹出应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  升级操作系统总是有风险的.您可能会遇到一些兼容性问题.我冒险将我的 macOS 从 Catalina 升级到最新的 Big Sur.在那之后,新操作系统中的显示看起来很漂亮,但是我所有的 PyQt5 应用程序都无法在这个新操作系统中启动.GUI 窗口没有像往常一样弹出,并且终端中没有显示错误消息.我花了一整天的时间试图弄清楚是什么导致了这个问题.我找到了解决方案,但以一种奇怪的方式让我感到困惑.

                  It is always risky to upgrade your operation system. It is likely you will encounter some compatibility issue. I took the risk to upgrade my macOS from Catalina to the newest Big Sur. After that, the display in the new OS looks pretty, but all my PyQt5 apps could not be launched in this new OS. The GUI window does not pop up as usual, and there is no error message showing in the terminal. I spent the whole day trying to figure out what makes this problem. I found the solution but in a weird way which I feel confused.

                  我在主脚本中添加以下三行后,应用程序恢复正常.

                  It turns out that the apps comes back to normal after I add the following three lines in the main script.

                  import matplotlib
                  import matplotlib.pyplot as plt
                  
                  matplotlib.use('TkAgg')
                  

                  在我看来,新操作系统与 Qt5Agg 后端存在一些兼容性问题.但奇怪的是,这个解决方案也适用于其中一个 Pyqt5 应用程序,我根本不使用 matplotlib.

                  It seems to me the new OS has some compatibility issue with Qt5Agg back-end. But the strange thing is that this solution also works for one of the Pyqt5 app, where I don't use matplotlib at all.

                  我使用的Python版本是3.8.4,我的PyQt5版本是5.15.1.

                  The Python version I used is 3.8.4, and the PyQt5 version I have is 5.15.1.

                  我希望有人可以向我解释使该解决方案起作用的幕后情况.我也希望这个临时解决方案可以帮助有同样问题的人.

                  I hope somebody could explain to me what happen under the hood that makes this solution work. Also I hope this temporary solution can help somebody with the same problem.

                  推荐答案

                  回复 PyQt 邮件列表指出设置这个 env var 有效:

                  A reply to the PyQt mailing list pointed out that setting this env var works:

                  QT_MAC_WANTS_LAYER=1
                  

                  通过 是否有任何关于 PyQt 库在 Mac OS Big Sur 中不起作用的解决方案? 和 https://forums.macrumors.com/threads/pyqt5-and-big-sur.2260773/?post=29243620#post-29243620

                  这篇关于macOS Big Sur 11.0.1 上未弹出应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:如何在 PyQt5 中通过拖放来绘制矩形并调整其形状 下一篇:PyQt5 按钮运行功能和更新 LCD

                  相关文章

                  最新文章

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

                  1. <legend id='c6gdh'><style id='c6gdh'><dir id='c6gdh'><q id='c6gdh'></q></dir></style></legend><tfoot id='c6gdh'></tfoot>

                      • <bdo id='c6gdh'></bdo><ul id='c6gdh'></ul>