(Solved) Unable to launch C:\Miniconda3\Lib\site-packages\pyqt5_tools\bin\uic.exe

When I use Qt Designer, I sometimes want to view the corresponding Python or C code with Form > View Code. However, the installed Qt Designer could not find the uic module and showed an error similar to:

Unable to launch C:\Miniconda3\Lib\site-packages\pyqt5_tools\bin\uic.exe

In my Miniconda installation, I found uic.exe at:

C:\Miniconda3\Lib\site-packages\pyqt5_tools\uic.exe

I also found the pyuic5 executable at:

C:\Miniconda3\Scripts\pyuic5.exe

Qt Designer was looking for the executable under a different path, so the fix was to make the expected path point to the real executable. On Windows, I could not create the link directly with the tools I was using, so I installed Hard Link Shell Extension and hard-linked the relevant executables to the path Qt Designer expected.

After creating the hard links, Form > View Code worked correctly.

Hard-linked Qt Designer uic executable path

Leave a Reply