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. Import packages in PySide2 has dll load fail, but import PySide2 is ok
Forum Updated to NodeBB v4.3 + New Features

Import packages in PySide2 has dll load fail, but import PySide2 is ok

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 3 Posters 4.9k Views 2 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.
  • K Offline
    K Offline
    klyjm
    wrote on last edited by
    #1

    When I use PySide2 in Anaconda, if I import Pyside2, it i ok; But when I import packages in PySide2, just like import PySide2.QtCore, there will be dll load fail:
    Python
    import PySide2.QtCore
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    ImportError: DLL load failed: The specified module could not be found.
    But when I use PyQt5, there will be nothing. My python is 3.6.8, PySide2 is 5.9.0, but when I use python 3.6.4 and PySide2 5.11.0, it is same. Do anyone know how to solve it? Thanks!

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by SGaist
      #2

      Hi,

      What do you get if you use:

      from PySide2 import QtCore
      

      ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      K 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        What do you get if you use:

        from PySide2 import QtCore
        

        ?

        K Offline
        K Offline
        klyjm
        wrote on last edited by
        #3

        @SGaist not useful. And I just solve it by remove in conda and pip install agian, and it can work, but has another error:

        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.
        

        I don't know how to fix it with out adding 'QT_QPA_PLATFORM_PLUGIN_PATH' in os environment PATH, have you ever met this error?

        Pablo J. RoginaP 1 Reply Last reply
        0
        • K klyjm

          @SGaist not useful. And I just solve it by remove in conda and pip install agian, and it can work, but has another error:

          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.
          

          I don't know how to fix it with out adding 'QT_QPA_PLATFORM_PLUGIN_PATH' in os environment PATH, have you ever met this error?

          Pablo J. RoginaP Offline
          Pablo J. RoginaP Offline
          Pablo J. Rogina
          wrote on last edited by
          #4

          @klyjm said in Import packages in PySide2 has dll load fail, but import PySide2 is ok:

          And I just solve it by remove in conda and pip install agian, and it can work, but has another error:

          I guess it would be good not to hijack the thread. If your issue about PySide2 dll load is solved, please mark it as such and then create a new post for the QT_QPA_PLATFORM_PLUGIN_PATH. It'll help other users in the forum that way.

          Upvote the answer(s) that helped you solve the issue
          Use "Topic Tools" button to mark your post as Solved
          Add screenshots via postimage.org
          Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

          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