Search code examples
pythonpyqt5qt-designer

Unable to create process : .ui to .py


I have been trying for a long time to generate a python code frome qtDesigner but I always have the same issue :

The command I used : pyuic5 ExtraInfo_Design.ui -o ExtraInfo_Designui.py

Fatal error in launcher: Unable to create process using '"c:\users\Dorian\appdata\local\programs\python\python37-32\python.exe"  "C:\Users\lDorian\Desktop\extrInfo\pyuic5.exe" ExtraInfo_Design.ui -o ExtraInfo_Designui.py'

I think that all these problems happen because I changed the name of my laptop so I have other files that had been created "lDorian".

I have tried to open the shell as ana administrator. I had tried to generate the code from a (.bat) file. I had tried to add python path to the path directory.

Thanks, folks.


Solution

  • After reinstalling Anaconda and all the version of python/pyqt that I already have, I opened the cmd on Windows but I had the same problem.

    The solution is:

    1. After reinstalling all and deleting the python link in the path environment.
    2. Open the Anaconda Powershell Prompt (not Anaconda Prompt) as an administrator
    3. Type pip install pyqt5
    4. then run : pyuic5 fileName.ui -o fileName.py

    Have a nice day.