"Pyuic4" is not recognized as an internal external command

I am trying to compile a ui file using Pyuic, but I cannot get it to work ... Every time I try to use the command

pyuic4 -o OutFile_ui.py InFile.ui

he just passes me this error

C: \ Windows \ system32> pyuic4 'pyuic4' is not recognized as an internal or external command, operating program, or batch file.

I really don't know where the pyuic file should be located, should PyQt be in Python files or something like that?

Please, help

+5
source share
2 answers

When you install PyQt , it gets the installation under Python site-packages .

There is a batch file pyuic.bat in <PYTHON_INSTALL_DIR>\Lib\site-packages\PyQt4 . Use this command to run your command.

If you look at the contents of the batch file, you will see that it invokes the Python interpreter with PyQt4\uic\pyuic.py and these arguments.

+8
source

If you add <PYTHON_INSTALL_DIR>\Lib\site-packages\PyQt4 to your environment path, you can run it from any directory using c:\pyuic4 input.ui -o output.py

+4
source

Source: https://habr.com/ru/post/1202732/


All Articles