Planned maintenance has been done but it did not solve the problem. So work will continue on this and a new time for trying updates will be announced asap.

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



  • 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!


  • Lifetime Qt Champion

    Hi,

    What do you get if you use:

    from PySide2 import QtCore
    

    ?



  • @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?



  • @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.


Log in to reply