Python安装PyQt5时遇到这个问题该怎么解决

objc[29962]:ClassRunLoopModeTrackerisimplementedinboth/Users/apple/Qt5.7.1/5.7/clang_... objc[29962]: Class RunLoopModeTracker is implemented in both /Users/apple/Qt5.7.1/5.7/clang_64/lib/QtCore.framework/Versions/5/QtCore (0x100e49dc0) and /Users/apple/anaconda3/lib/libQt5Core.5.6.2.dylib (0x10610f9a8). One of the two will be used. Which one is undefined.

objc[29962]: Class NotificationReceiver is implemented in both /Users/apple/Qt5.7.1/5.7/clang_64/lib/QtWidgets.framework/Versions/5/QtWidgets (0x102358ef0) and /Users/apple/anaconda3/lib/libQt5Widgets.5.6.2.dylib (0x1055c3fb8). One of the two will be used. Which one is undefined.

QObject::moveToThread: Current thread (0x7ffc774f3eb0) is not the object's thread (0x7fffa33c73c0).

Cannot move to target thread (0x7ffc774f3eb0)

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.

This application failed to start because it could not find or load the Qt platform plugin "cocoa"

in "".
展开
 我来答
从空去听8
2017-08-26 · TA获得超过7440个赞
知道大有可为答主
回答量:6907
采纳率:93%
帮助的人:5588万
展开全部
Linux系统下Qt5编译好的程序在未安装Qt的系统下运行会报以下错误:
This application failed to start because it could not find or load the Qt platform plugin "xcb".

Reinstalling the application may fix this problem.
出现这个错误,主要是因为qt5为了在多平台下更方便移植,使用了一种新的技术-----platform abstraction system (QPA),而它中的库又依赖于Qt5中的一个库文件libQt5DBus.so.5,所以,只要打包时只要加上这个文件就可以了。
linux下qt5程序打包步骤如下
1、把以下7个库文件放到/usr/lib目录下

libQt5Widgets.so.5
libQt5Gui.so.5
libQt5Core.so.5
libicui18n.so.51
libicuuc.so.51
libicudata.so.51
libQt5DBus.so.5
2、拷贝Qt5安装目录中的platforms目录,使它和你的Qt程序同级目录
现在你可以双击你的程序运行了呵呵
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式