python-3.x PyQt 5:在带有链接时间参考的libdbus-1.so.3文件中未定义版本LIBDBUS_1_3

dluptydi  于 2023-03-24  发布在  Python
关注(0)|答案(1)|浏览(133)

我使用python3并尝试从PyQt4迁移到PyQt5。

from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *

class MyMonitor(QWidget, mon_ui.Ui_monitor):
    def __init__(self, workdir, refresh, parent = None):
        QWidget.__init__(self, parent)
        self.setupUi(self)
        self.setupMembers(workdir, refresh)
        # More code ...

    # more methods

if __name__ == "__main__":
    opts = monGetOpts()
    sys.excepthook = monExceptionsHandler
    signal(SIGINT, monSignalsHandler)
    app = QApplication(sys.argv)
    style = QStyleFactory.create('windows')
    app.setStyle(style)
    MyMonitor = MyMonitor(opts['workdir'], opts['refresh'])
    MyMonitor.show()
    app.exec_()

由于某种原因,它在到达self.setupUi(self)行时失败:

python3.6.3: relocation error: /usr/pkgs/python3/3.6.3/modules/r1/lib/python3.6/site-packages/PyQt5/Qt/plugins/platforms/../../lib/libQt5DBus.so.5: symbol dbus_message_get_allow_interactive_authorization, version LIBDBUS_1_3 not defined in file libdbus-1.so.3 with link time reference

我试着谷歌这个错误消息,发现了一些票,但他们没有说明他们如何解决它。有人看到它吗?如何解决它?如何调试它?

rta7y2nd

rta7y2nd1#

我在SLES12上遇到了这个问题。一旦我使用python 3.7并将包版本限制为pyqt5〈5.12,它就对我有效了。

相关问题