How to convert a .ui file to .py file with PyQt5 and python 3.6


Converting a .ui file to a .py file using cmd

C:/Python36/Lib/site-packages/PyQt5/pyuic.cpython-36.pyc -x mainwindow.ui -o

The error shows like

The system cannot find the path specified.

I checked the path, unfortunately, there is no file named in the PyQt folder

please, someone, check this problem


I found an answer to the above

first, we need to locate the pyuic5.exe file and copy your ui file to the same location.
then, we have to create a command prompt and give the command will give the python file .

pyuic5.exe mainwindow.ui -o -x

Answered By – Aju George

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published