Troubles using pyuic5

784 Views Asked by At

I had python 3.8.5 installed on my machine, and I have pyuic5 installed and used it to convert .ui to .py files (using cmd). I recently upgraded to python 3.8.7, and whenever I try to convert now, I get this error:

C:\Users\....>pyuic5 -x Windows.ui -o Windows.py
Fatal error in launcher: Unable to create process using '"d:\program files\python3.8.5\python.exe"  "D:\Program Files\Python 3.8.7\Scripts\pyuic5.exe" -x Windows.ui -o Windows.py': The system cannot find the file specified.

I made sure that pyqt5 and pyuic5 have been installed correctly. I am no expert, but I believe that cmd is looking for the python.exe file from python3.8.5 folder (the older version I had installed) instead of the one in python3.8.7 folder.

2

There are 2 best solutions below

0
On

UPDATE: I pip uninstalled/re-installed the following, and that solved my issue: PyQt5 PyQt5-tools PyQt5-sip PyQtWebEngine

0
On

In my case I had removed a previous Python version (3.8) and the program was ignoring the more recent one (3.10). The solution was to manually add a variable to Windows path with name pyuic5 and the path to where the correct file is saved. I also removed the old variables pointing to Python 3.8.