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?
Asked
Active
Viewed 359 times
-1
-
What file are you trying to convert? Where did you get it from? – ekhumoro Dec 23 '16 at 00:09
-
firstly Install python 2.7 on your computer – eyllanesc Dec 23 '16 at 01:19
-
Thank you ekhumoro. I am trying to convert file ui. I created the file with QT Desiner, version 4.8.5. My intention was to create a ui for QGIS that use Python 2.7 (for the moment). – Heryx Dec 23 '16 at 09:20
3 Answers
1
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

Nanda Kumar P
- 135
- 10
0
I solved my problem! I used the Windows shell, but I had to use that to Osgeo4W.

Heryx
- 1
- 2
-
This unfortunately in not a helpful answer for anyone else who may have your problem in the future. Could you describe the steps you used to solve your problem? – airhuff Jan 13 '17 at 17:26
0
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