Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Error of installation



  • Hello, I've just installed PySide6, so I wanted to try it. I run this code :

    import PySide6.QtCore 
    print(PySide6.__version__)
    print(PySide6.QtCore.__version__)
    

    I had a perfect result
    But I then wanted to try the hello world code :

    import sys
    import random
    from PySide6 import QtCore, QtWidgets, QtGui
    
    class MyWidget(QtWidgets.QWidget):
        def __init__(self):
            super().__init__()
    
            self.hello = ["Hallo Welt", "Hei maailma", "Hola Mundo", "Привет мир"]
    
            self.button = QtWidgets.QPushButton("Click me!")
            self.text = QtWidgets.QLabel("Hello World",
                                         alignment=QtCore.Qt.AlignCenter)
    
            self.layout = QtWidgets.QVBoxLayout()
            self.layout.addWidget(self.text)
            self.layout.addWidget(self.button)
            self.setLayout(self.layout)
    
            self.button.clicked.connect(self.magic)
    
        QtCore.Slot()
        def magic(self):
            self.text.setText(random.choice(self.hello))
    
    if __name__ == "__main__":
        app = QtWidgets.QApplication([])
    
        widget = MyWidget()
        widget.resize(800, 600)
        widget.show()
    
        sys.exit(app.exec_())
    

    But I had this an error :

    Warning: Ignoring WAYLAND_DISPLAY on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
    Found invalid metadata in lib /home/dimitri/anaconda3/plugins/platforms/libqeglfs.so: Invalid metadata version
    Found invalid metadata in lib /home/dimitri/anaconda3/plugins/platforms/libqminimal.so: Invalid metadata version
    Found invalid metadata in lib /home/dimitri/anaconda3/plugins/platforms/libqminimalegl.so: Invalid metadata version
    Found invalid metadata in lib /home/dimitri/anaconda3/plugins/platforms/libqoffscreen.so: Invalid metadata version
    Found invalid metadata in lib /home/dimitri/anaconda3/plugins/platforms/libqvnc.so: Invalid metadata version
    Found invalid metadata in lib /home/dimitri/anaconda3/plugins/platforms/libqxcb.so: Invalid metadata version
    qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
    qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
    This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
    
    Abandon (core dumped)
    

    Do you have an idea of where it could come from ? thank you in advance



  • @dimitriab
    Start from the first error. Are you expecting to use Wayland or are you expecting to be using X11?



  • I think I will use wayland. But what can I do ?


Log in to reply