Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. PySide6 ImportError
Forum Updated to NodeBB v4.3 + New Features

PySide6 ImportError

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 2 Posters 1.9k 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.
  • J Offline
    J Offline
    JamesAndrei-DG
    wrote on last edited by
    #1

    Hello everyone! I’m hoping to get some advice on an issue I’m facing with PySide6 in a Conda environment.

    I’m working on a PySide6 application and initially installed PySide6 via Conda. Unfortunately, this package didn't include pyside6-addons, which I need. So, I installed the missing parts with pip install.

    That's when I ran into this error:

    ImportError: DLL load failed while importing QtWebEngineWidgets: The specified module could not be found.
    
    

    I looked for fixes and found that reinstalling could help, so I tried completely installing PySide6 with pip instead. However, this introduced a new error:

    qt.qpa.plugin: Could not load the Qt platform plugin "windows" in "" even though it was found. Available platform plugins are: direct2d, minimal, offscreen, windows.
    
    

    For context, I’m using Qt 6.7.3 and working in PyCharm.
    I’d be grateful for any suggestions on how to resolve this.
    Thank you in advance for any help!

    jsulmJ 1 Reply Last reply
    0
    • J JamesAndrei-DG

      Hello everyone! I’m hoping to get some advice on an issue I’m facing with PySide6 in a Conda environment.

      I’m working on a PySide6 application and initially installed PySide6 via Conda. Unfortunately, this package didn't include pyside6-addons, which I need. So, I installed the missing parts with pip install.

      That's when I ran into this error:

      ImportError: DLL load failed while importing QtWebEngineWidgets: The specified module could not be found.
      
      

      I looked for fixes and found that reinstalling could help, so I tried completely installing PySide6 with pip instead. However, this introduced a new error:

      qt.qpa.plugin: Could not load the Qt platform plugin "windows" in "" even though it was found. Available platform plugins are: direct2d, minimal, offscreen, windows.
      
      

      For context, I’m using Qt 6.7.3 and working in PyCharm.
      I’d be grateful for any suggestions on how to resolve this.
      Thank you in advance for any help!

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by jsulm
      #2

      @JamesAndrei-DG Set QT_DEBUG_PLUGINS environment variable before launching your app in terminal and check the output - it should provide more details about the issue.
      See https://doc.qt.io/qt-6/debug.html for more details.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • J Offline
        J Offline
        JamesAndrei-DG
        wrote on last edited by
        #3

        I’m seeing the following log. Also, I’m using Windows

        qt.core.plugin.factoryloader: checking directory path "D:/MiniForge/envs/test/envs/test/Library/lib/qt6/plugins/platforms" ...
        qt.core.plugin.factoryloader: looking at "D:/MiniForge/envs/test/envs/test/Library/lib/qt6/plugins/platforms/qdirect2d.dll"
        qt.core.plugin.loader: Found metadata in lib D:/MiniForge/envs/test/envs/test/Library/lib/qt6/plugins/platforms/qdirect2d.dll, metadata=
        {
            "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
            "MetaData": {
                "Keys": [
                    "direct2d"
                ]
            },
            "archlevel": 1,
            "className": "QWindowsDirect2DIntegrationPlugin",
            "debug": false,
            "version": 395008
        }
        
        
        qt.core.plugin.factoryloader: Got keys from plugin meta data QList("direct2d")
        qt.core.plugin.factoryloader: looking at "D:/MiniForge/envs/test/envs/test/Library/lib/qt6/plugins/platforms/qminimal.dll"
        qt.core.plugin.loader: Found metadata in lib D:/MiniForge/envs/test/envs/test/Library/lib/qt6/plugins/platforms/qminimal.dll, metadata=
        {
            "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
            "MetaData": {
                "Keys": [
                    "minimal"
                ]
            },
            "archlevel": 0,
            "className": "QMinimalIntegrationPlugin",
            "debug": false,
            "version": 395008
        }
        
        
        qt.core.plugin.factoryloader: Got keys from plugin meta data QList("minimal")
        qt.core.plugin.factoryloader: looking at "D:/MiniForge/envs/test/envs/test/Library/lib/qt6/plugins/platforms/qoffscreen.dll"
        qt.core.plugin.loader: Found metadata in lib D:/MiniForge/envs/test/envs/test/Library/lib/qt6/plugins/platforms/qoffscreen.dll, metadata=
        {
            "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
            "MetaData": {
                "Keys": [
                    "offscreen"
                ]
            },
            "archlevel": 0,
            "className": "QOffscreenIntegrationPlugin",
            "debug": false,
            "version": 395008
        }
        
        
        qt.core.plugin.factoryloader: Got keys from plugin meta data QList("offscreen")
        qt.core.plugin.factoryloader: looking at "D:/MiniForge/envs/test/envs/test/Library/lib/qt6/plugins/platforms/qwindows.dll"
        qt.core.plugin.loader: Found metadata in lib D:/MiniForge/envs/test/envs/test/Library/lib/qt6/plugins/platforms/qwindows.dll, metadata=
        {
            "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
            "MetaData": {
                "Keys": [
                    "windows"
                ]
            },
            "archlevel": 0,
            "className": "QWindowsIntegrationPlugin",
            "debug": false,
            "version": 395008
        }
        
        
        qt.core.plugin.factoryloader: Got keys from plugin meta data QList("windows")
        qt.core.plugin.factoryloader: checking directory path "D:/MiniForge/envs/test/envs/test/platforms" ...
        qt.core.library: "D:/MiniForge/envs/test/envs/test/Library/lib/qt6/plugins/platforms/qwindows.dll" cannot load: Cannot load library D:\MiniForge\envs\test\Library\lib\qt6\plugins\platforms\qwindows.dll: The specified procedure could not be found.
        qt.core.plugin.loader: QLibraryPrivate::loadPlugin failed on "D:/MiniForge/envs/test/envs/test/Library/lib/qt6/plugins/platforms/qwindows.dll" : "Cannot load library D:\\MiniForge\\envs\\test\\Library\\lib\\qt6\\plugins\\platforms\\qwindows.dll: The specified procedure could not be found."
        qt.qpa.plugin: Could not load the Qt platform plugin "windows" in "" even though it was found.
        This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
        
        Available platform plugins are: direct2d, minimal, offscreen, windows.
        
        jsulmJ 1 Reply Last reply
        0
        • J JamesAndrei-DG

          I’m seeing the following log. Also, I’m using Windows

          qt.core.plugin.factoryloader: checking directory path "D:/MiniForge/envs/test/envs/test/Library/lib/qt6/plugins/platforms" ...
          qt.core.plugin.factoryloader: looking at "D:/MiniForge/envs/test/envs/test/Library/lib/qt6/plugins/platforms/qdirect2d.dll"
          qt.core.plugin.loader: Found metadata in lib D:/MiniForge/envs/test/envs/test/Library/lib/qt6/plugins/platforms/qdirect2d.dll, metadata=
          {
              "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
              "MetaData": {
                  "Keys": [
                      "direct2d"
                  ]
              },
              "archlevel": 1,
              "className": "QWindowsDirect2DIntegrationPlugin",
              "debug": false,
              "version": 395008
          }
          
          
          qt.core.plugin.factoryloader: Got keys from plugin meta data QList("direct2d")
          qt.core.plugin.factoryloader: looking at "D:/MiniForge/envs/test/envs/test/Library/lib/qt6/plugins/platforms/qminimal.dll"
          qt.core.plugin.loader: Found metadata in lib D:/MiniForge/envs/test/envs/test/Library/lib/qt6/plugins/platforms/qminimal.dll, metadata=
          {
              "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
              "MetaData": {
                  "Keys": [
                      "minimal"
                  ]
              },
              "archlevel": 0,
              "className": "QMinimalIntegrationPlugin",
              "debug": false,
              "version": 395008
          }
          
          
          qt.core.plugin.factoryloader: Got keys from plugin meta data QList("minimal")
          qt.core.plugin.factoryloader: looking at "D:/MiniForge/envs/test/envs/test/Library/lib/qt6/plugins/platforms/qoffscreen.dll"
          qt.core.plugin.loader: Found metadata in lib D:/MiniForge/envs/test/envs/test/Library/lib/qt6/plugins/platforms/qoffscreen.dll, metadata=
          {
              "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
              "MetaData": {
                  "Keys": [
                      "offscreen"
                  ]
              },
              "archlevel": 0,
              "className": "QOffscreenIntegrationPlugin",
              "debug": false,
              "version": 395008
          }
          
          
          qt.core.plugin.factoryloader: Got keys from plugin meta data QList("offscreen")
          qt.core.plugin.factoryloader: looking at "D:/MiniForge/envs/test/envs/test/Library/lib/qt6/plugins/platforms/qwindows.dll"
          qt.core.plugin.loader: Found metadata in lib D:/MiniForge/envs/test/envs/test/Library/lib/qt6/plugins/platforms/qwindows.dll, metadata=
          {
              "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
              "MetaData": {
                  "Keys": [
                      "windows"
                  ]
              },
              "archlevel": 0,
              "className": "QWindowsIntegrationPlugin",
              "debug": false,
              "version": 395008
          }
          
          
          qt.core.plugin.factoryloader: Got keys from plugin meta data QList("windows")
          qt.core.plugin.factoryloader: checking directory path "D:/MiniForge/envs/test/envs/test/platforms" ...
          qt.core.library: "D:/MiniForge/envs/test/envs/test/Library/lib/qt6/plugins/platforms/qwindows.dll" cannot load: Cannot load library D:\MiniForge\envs\test\Library\lib\qt6\plugins\platforms\qwindows.dll: The specified procedure could not be found.
          qt.core.plugin.loader: QLibraryPrivate::loadPlugin failed on "D:/MiniForge/envs/test/envs/test/Library/lib/qt6/plugins/platforms/qwindows.dll" : "Cannot load library D:\\MiniForge\\envs\\test\\Library\\lib\\qt6\\plugins\\platforms\\qwindows.dll: The specified procedure could not be found."
          qt.qpa.plugin: Could not load the Qt platform plugin "windows" in "" even though it was found.
          This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
          
          Available platform plugins are: direct2d, minimal, offscreen, windows.
          
          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @JamesAndrei-DG said in PySide6 ImportError:

          D:/MiniForge/envs/test/envs/test/Library/lib/qt6/plugins/platforms/qwindows.dll

          Something is wrong with that lib.

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • J Offline
            J Offline
            JamesAndrei-DG
            wrote on last edited by
            #5

            I figured something out. I created a new conda environment with only Python 3.11 and installed PySide 6.7.3 via pip, and now everything works fine. It seems the issue was due to conflicts with other libraries.
            The error comes from this setup, my conda environment has only Python 3.11, easyocr, folium, numpy, and OpenCV, with PySide6 installed through pip.

            On the other hand, I could install pyside6 with my conda environment and it will work fine. But i try to install pyside6-addons using pip it leads to this

            ImportError: DLL load failed while importing QtWebEngineWidgets: The specified module could not be found.
            
            
            jsulmJ 1 Reply Last reply
            0
            • J JamesAndrei-DG

              I figured something out. I created a new conda environment with only Python 3.11 and installed PySide 6.7.3 via pip, and now everything works fine. It seems the issue was due to conflicts with other libraries.
              The error comes from this setup, my conda environment has only Python 3.11, easyocr, folium, numpy, and OpenCV, with PySide6 installed through pip.

              On the other hand, I could install pyside6 with my conda environment and it will work fine. But i try to install pyside6-addons using pip it leads to this

              ImportError: DLL load failed while importing QtWebEngineWidgets: The specified module could not be found.
              
              
              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @JamesAndrei-DG said in PySide6 ImportError:

              QtWebEngineWidgets

              Is this module installed?

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • J Offline
                J Offline
                JamesAndrei-DG
                wrote on last edited by
                #7

                Yes I installed it using pip with the PySide6-addons, which include the QtWebEngineWidgets module.

                For now, I managed to get it working by switching to a venv environment instead of conda, and everything worked smoothly. It seems like using conda with pip might be causing some libraries to get removed or overwritten.

                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