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. PySide 6.5.0: Cannot load library qtquick2plugin.dll
Forum Updated to NodeBB v4.3 + New Features

PySide 6.5.0: Cannot load library qtquick2plugin.dll

Scheduled Pinned Locked Moved Unsolved Qt for Python
qt for pythonpyside
4 Posts 2 Posters 1.1k Views 1 Watching
  • 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
    demberto
    wrote on last edited by
    #1

    __main__.py

    import pathlib
    import sys
    
    from PySide6.QtGui import QGuiApplication
    from PySide6.QtQml import QQmlApplicationEngine
    
    from __feature__ import snake_case, true_property  # type: ignore # noqa
    
    if __name__ == "__main__":
        app = QGuiApplication(sys.argv)
        engine = QQmlApplicationEngine()
        engine.load(str(pathlib.Path(__file__).parent / "welcome.ui.qml"))
    

    welcome.ui.qml:

    import QtQuick
    import QtQuick.Controls
    import QtQuick.Layouts
    
    Window {
        title: "MyWindow"
        visible: true
    
        RowLayout {
            anchors.fill: parent
    
            Button {
                text: "B1"
            }
    
            Button {
                text: "B2"
            }
        }
    }
    

    This results in an error:

    QQmlApplicationEngine failed to load component
    file:///.../welcome.ui.qml:1:1: Cannot load library ...\Lib\site-packages\PySide6\qml\QtQuick\qtquick2plugin.dll: The specified module could not be found.
    
    D 1 Reply Last reply
    0
    • D demberto

      __main__.py

      import pathlib
      import sys
      
      from PySide6.QtGui import QGuiApplication
      from PySide6.QtQml import QQmlApplicationEngine
      
      from __feature__ import snake_case, true_property  # type: ignore # noqa
      
      if __name__ == "__main__":
          app = QGuiApplication(sys.argv)
          engine = QQmlApplicationEngine()
          engine.load(str(pathlib.Path(__file__).parent / "welcome.ui.qml"))
      

      welcome.ui.qml:

      import QtQuick
      import QtQuick.Controls
      import QtQuick.Layouts
      
      Window {
          title: "MyWindow"
          visible: true
      
          RowLayout {
              anchors.fill: parent
      
              Button {
                  text: "B1"
              }
      
              Button {
                  text: "B2"
              }
          }
      }
      

      This results in an error:

      QQmlApplicationEngine failed to load component
      file:///.../welcome.ui.qml:1:1: Cannot load library ...\Lib\site-packages\PySide6\qml\QtQuick\qtquick2plugin.dll: The specified module could not be found.
      
      D Offline
      D Offline
      demberto
      wrote on last edited by
      #2

      Just a bump. I am really stuck on this one, can anybody help me out?

      1 Reply Last reply
      0
      • F Offline
        F Offline
        friedemannkleint
        wrote on last edited by
        #3

        The example works fine here, so, it looks like a broken installation. Have you tried re-creating your virtual environment?

        D 1 Reply Last reply
        0
        • F friedemannkleint

          The example works fine here, so, it looks like a broken installation. Have you tried re-creating your virtual environment?

          D Offline
          D Offline
          demberto
          wrote on last edited by
          #4

          @friedemannkleint I tried all that, I tried different versions of virtual environments. Finally I switched over to PyQt6 and now it works flawlessly.

          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