Amrith Raj Herle
Amrith Raj Herle

Reputation: 875

converting Qt Designer(.ui) file to python(.py) executable file in windows machine

I have faced a lot of issue in converting Qt UI file to Python File.

I was using anaconda for python related stuffs. So when i'm trying to convert the filename.ui Qt file to finlename.py it was showing many errors since i'm not using directly python, but anoconda for creating python environment.

Upvotes: 0

Views: 1432

Answers (1)

Amrith Raj Herle
Amrith Raj Herle

Reputation: 875

Direct conversion from filename.ui file to filename.py file is quite easy but due to so many users input in the web made me to try all the thing and non really succeed.

I have anaconda installed in my C drive in follwoing path. C:\ProgramData\Anaconda3

Open command prompt (cmd) in windows.

  • Step 1: Go to \Scripts folder in C:\ProgramData\Anaconda3

    example: cd C:\ProgramData\Anaconda3\Scripts
    
  • Step 2: If you not find the pyuic5.exe file then please install PyQT5 using pip.

    example: pip install PyQT5==5.9
    
  • Step 3: Execute: pyuic5.exe -x <> -o <>

    example: pyuic5 -x D:\TUK\MasterThesis\ML\Lable_Data.ui -o D:\TUK\MasterThesis\ML\Lable_Data.py
    

Note: please give absolute path name for the files so that there will be no confusion when a file gets generated.

commandline

Upvotes: 1

Related Questions