Python: PyQt4 QtGui ImportError: DLL loading error

I am trying to use PyQt4, but I can never use QtGui. I get the following error ...

    from PyQt4 import QtGui
ImportError: DLL load failed: The specified module could not be found.

from the following code ...

import sys
from PyQt4 import QtGui

app = QtGui.QApplication(sys.argv)  #define the app
win = QtGui.Qwidget()               #define the window
win.show()                          #show the window

I think this may be a problem with the installation - I tried to use both the exe-installer and manually put the download in the appropriate area. I also made sure that the path variable is correct.

I also installed Python (Python35) and uninstalled it several times - one of the possible problems is that my python installation always ends in C: \ Users \ Frank \ AppData \ Local \ Programs \ Python \ Python35

Whenever I install PyQt, I am sure that all the relevant files are placed in this directory, but still - no luck! I have no ideas.

Thanks in advance.

+4

Source: https://habr.com/ru/post/1620455/


All Articles