Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. Error of installation

Error of installation

Scheduled Pinned Locked Moved Unsolved Qt for Python
3 Posts 2 Posters 788 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dimitriab
    wrote on last edited by
    #1

    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

    JonBJ 1 Reply Last reply
    0
    • D dimitriab

      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

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dimitriab
        wrote on last edited by dimitriab
        #3

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

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved