I wanted to install a GUI toolkit for python and pyqt looked good but when I install the complete binary on the pyqt site and run designer, I get this error when I try to go to the code


Anyone know how to fix it?

And if not, can I manually code with the pyqt gui toolkit? Using another purely textbased no gui code generating ide?

I don't know how to fix error from the screenshot, but i PyQt folder you can find three utility programs:

  • pyuic4.bat corresponds to the Qt uic utility. It converts GUIs created using Qt Designer to Python code.
  • pyrcc4.exe corresponds to the Qt rcc utility. It embeds arbitrary resources (eg. icons, images, translation files) described by an XML resource collection file in a Python module. These resources can then be accessed from a PyQt application as files in a virtual filesystem.
  • pylupdate4.exe corresponds to the Qt lupdate utility. It extracts all of the translatable strings from Python code and creates or updates translation files. These are then used by Qt Linguist to manage the translation of those strings.

You can copy these files to another folder, for example C:\ or add to system path variable this entry C:\Python27\Lib\site-packages\PyQt4;
Save your GUI from Qt Designer to .ui file, and run from cmd:

pyuic4 mygui.ui > mygui.py

Now you can write your main module and import mygui.py. Look to Reference Guide how to using the generated code.

This question has already been answered. Start a new discussion instead.