【发布时间】:2022-07-05 12:10:21
【问题描述】:
当我尝试在我想使用 PySide2 的地方运行我的代码时遇到以下错误。
objc[18673]: Class RunLoopModeTracker is implemented in both /opt/anaconda3/lib/python3.8/site-packages/PySide2/Qt/lib/QtCore.framework/Versions/5/QtCore (0x11c3c0288) and /opt/anaconda3/lib/libQt5Core.5.9.7.dylib (0x1207e3a80). One of the two will be used. Which one is undefined.
QObject::moveToThread: Current thread (0x7fe94dc18af0) is not the object's thread (0x7fe94df34560).
Cannot move to target thread (0x7fe94dc18af0)
You might be loading two sets of Qt binaries into the same process. Check that all plugins are compiled against the right Qt binaries. Export DYLD_PRINT_LIBRARIES=1 and check that only one set of binaries are being loaded.
qt.qpa.plugin: Could not load the Qt platform plugin "cocoa" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: cocoa, minimal, offscreen.
Abort trap: 6
不幸的是,我不知道这意味着什么以及如何处理它,我已经尝试在谷歌上搜索它,但没有任何有用的信息出现!
我使用的是 Python 3.8.5、PySide 5.15.2,并且我使用的是 Mac OS 10.15.7。感谢您的帮助!
【问题讨论】: