Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Solved Troubles using pyuic5

    Language Bindings
    2
    9
    5454
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      Ahmed Zeid last edited by

      I had python 3.8.5 installed on my machine, and I had 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.

      (Note that Python, as well as other modules work perfectly)
      I made sure that pyqt5 and pyuic5 have been installed correctly. I also made sure the python.exe, the python script folder and the PyQt5 folder's paths are added to my environment variables.
      I am no expert, but I believe that cmd is looking for the python.exe file from python3.8.5 folder (which doesn't even exist) instead of the one in python3.8.7 folder.

      Ratzz 1 Reply Last reply Reply Quote 0
      • A
        Ahmed Zeid last edited by

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

        1 Reply Last reply Reply Quote 1
        • Ratzz
          Ratzz @Ahmed Zeid last edited by

          @Ahmed-Zeid said in Troubles using pyuic5:

          The system cannot find the file specified.

          Is your Windows.ui is in same location as pyuic5 ?

          A 1 Reply Last reply Reply Quote 0
          • A
            Ahmed Zeid @Ratzz last edited by Ahmed Zeid

            @Ratzz
            Same location as pyuic.py file? Yes, still doesn't work. And before it was in a completely separate file, and there were no issues at all (before python upgrade)! I don't believe the problem is with the .ui file, as typing "pyuic5" only, gives the same error:
            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" ': The system cannot find the file specified.

            1 Reply Last reply Reply Quote 0
            • Ratzz
              Ratzz last edited by

              @Ahmed-Zeid said in Troubles using pyuic5:

              '"d:\program files\python3.8.5\python.exe"

              This is pointing to 3.8.5

              "D:\Program Files\Python 3.8.7\Scripts\pyuic5.exe"

              This is pointing to 3.8.7

              Both are valid path?

              A 1 Reply Last reply Reply Quote 0
              • A
                Ahmed Zeid @Ratzz last edited by

                @Ratzz
                The second is valid, whereas the first doesn't even exist anymore. Is there a way to redirect it to the new executable's path?

                Ratzz 2 Replies Last reply Reply Quote 0
                • Ratzz
                  Ratzz @Ahmed Zeid last edited by

                  This post is deleted!
                  1 Reply Last reply Reply Quote 0
                  • Ratzz
                    Ratzz @Ahmed Zeid last edited by

                    @Ahmed-Zeid
                    As you added python to PATH I do not see any other option. May be some else would know.

                    A 1 Reply Last reply Reply Quote 0
                    • A
                      Ahmed Zeid @Ratzz last edited by

                      @Ratzz , That's quite alright. Thank you for your assist!

                      1 Reply Last reply Reply Quote 1
                      • A
                        Ahmed Zeid last edited by

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

                        1 Reply Last reply Reply Quote 1
                        • First post
                          Last post