'pyuic5' is not recognized as an internal or external command
37,207
Solution 1
for any one has this problem: the key is that in anaconda3 pyuic5.bat is in:
Anaconda3\Library\bin
also the Designer is here.
so in cmd you must first cd to:
Anaconda\Library\bin\
then:
pyuic5.bat -x filename.ui -o filename.py
Solution 2
You need to first install pyqt5-tools
Via cmd writes Notice: python should be in windows environment variables :
pip install pyqt5-tools
Then you can use pyuic5
pyuic5 -x yourform.ui -o file.py
Solution 3
go to this path in your anaconda installation
C:\Program Files\Anaconda3\Library\bin
edit the pyuic5.bat
add "" to the bath
so it should be like this:
@"C:/Program Files/Anaconda3\python.exe" .....
then use this code to convert your file:
pyuic5 -x example.ui -o example.py
Comments
-
keramat almost 2 years
I am trying to convert ui file created by QTDesigner to py file. but i get the error: pyuic5 is not recognized as an internal or external command. I use anaconda 3, and tried all suggestions here:
C:/Program is not recognized ...related to pyuic5.
and i have seen here:
-
Echeban over 4 yearsbut I did not install Anaconda, because the pyuic5 is supposed to be bundled with pyQt5, which I installed, so the question remains, once the venv is accessed from the CMD shell, why pyuic5 cannot be resolved by Windows?
-
David Buck over 2 yearsAn answer isn't better just because you make it entirely bold, it's just harder to read. Especially if you don't use line breaks, paragraphs or code formatting.
-
ghost21blade over 2 yearsi simply installed pyqt5 using
pip install PyQt5
and pyuic5 command is not working. but i found pyuic.py in "...Python38\Lib\site-packages\PyQt5\uic" i runned it and it also give error from .driver import Driver ImportError: attempted relative import with no known parent package -
Admin about 2 yearsAs it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.