0

I installed WinPython64-3.9.2.0 on my Windows 10 laptop. I tried to make a GUI with Qt Designer, but when I click on Form and then on View Python Code... I get the following warning message:

Unable to launch C:WPy64-3910\python-3.9.1.amd64\lib\site-packages\pyqt_tools\Qt\bin\bin\uic: Process failed to start: The system cannot find the file specified.

I click on OK and I don't get the Python code of the GUI.

Please, can you help me?

Andrea
  • 101
  • 7
  • This post might be helpful: https://stackoverflow.com/questions/13792502/unable-to-launch-qt-uic – sweak Mar 17 '21 at 19:21
  • Thank you! The post suggests to convert the .ui file into a .py by using the command prompt. I execute the following script in the WinPython directory: >pyuic5 -m untitled.ui -o untitled.py #But I get the following warning in the command prompt: "Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases." – Andrea Mar 17 '21 at 21:49
  • Then there seems to be another post on that thread: https://stackoverflow.com/questions/65348890/python-was-not-found-run-without-arguments-to-install-from-the-microsoft-store – sweak Mar 17 '21 at 22:08
  • The solution was to add Python to Path. Thanks a lot! – Andrea Mar 18 '21 at 08:32
  • @Andrea I suggest you to make that comment an answer (possibly by explaining the step you used), so that you can also mark it as accepted as soon as the system allows it. – musicamante Mar 18 '21 at 09:55

1 Answers1

0

The solution is to open the Start menu and click Settings, type "Edit environment variables for your account" and click on it. You will get a new window called "Environmental Variables". Click "New" under "User variables for username" and you will get another window. Next to "variable name:" write "Path" and next to "Variable value:" write

C:\WPy64-3910\python-3.9.1.amd64 ; C:\WPy64-3910\python-3.9.1.amd64\Scripts

Note that I used a semicolumn to separate the two paths.

In case you use LaTex editors like Texmaker remember to add also this after a semicolumn:

C:\Users\ username \AppData\Local\Programs\MiKTeX\miktex\bin\x64\

Otherwise Texmaker won't work.

Andrea
  • 101
  • 7