How to convert file.ui into file.py with pyuic version 4.8.5?

374 views Asked by At

I've had a problem converting file.ui into file.py, because I am using the 4.8.5 version of pyuic on my PC, and the version downloadable is 4.11 (for Python 3). I need to work with python 2.7 - how can I do it?

3

There are 3 answers

1
Heryx On

I solved my problem! I used the Windows shell, but I had to use that to Osgeo4W.

0
Leonardo Ibarra On

As Heryx said, for me it was also necessary to use the OSGeo4W Shell (which is installed with QGIS2) to run pyuic4. In the OSGeo4W Shell i CD into the folder where my .ui file was and then successfully used the following command:

pyuic4 -x fileA.ui -o fileA.py

0
Nanda Kumar P On

the command to convert the .ui file to .py is:

$ sudo apt-get install python-qt4
$  sudo apt install python3-pyqt4
$ sudo apt-get install pyqt4-dev-tools

pyuic4 -x mainw.ui -o filename.py