'Pyuic4' is not recognized as an internal external command

33,187

Solution 1

When you install PyQt, it gets install under Python's site-packages.

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

If you look into the content of the batch file you will see that it calls the Python interpreter with PyQt4\uic\pyuic.py and the given arguments.

Solution 2

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

Share:
33,187
RasmusGP
Author by

RasmusGP

Updated on July 09, 2022

Comments

  • RasmusGP
    RasmusGP almost 2 years

    Im trying to compile a ui file by using Pyuic, but i can't get it to work... Every time i try using the command

    pyuic4 -o OutFile_ui.py InFile.ui

    it just givet me this error

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

    I actually dont't know where the pyuic file should be located, should PyQt, be located within the Python files or something?

    Please Help