Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. pyside6-designer launcher is absent
Forum Updated to NodeBB v4.3 + New Features

pyside6-designer launcher is absent

Scheduled Pinned Locked Moved Solved Qt for Python
17 Posts 3 Posters 7.3k Views 2 Watching
  • 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.
  • S Offline
    S Offline
    StarterKit
    wrote on last edited by
    #1

    Hi all,
    I'm looking forward to create a custom widget and use it with QtDesigner as described here.
    This link refers to pyside6-designer launcher as a mandatory component for Python-based custom widgets.
    But this launcher is absent on my system (even if I have pyside 6.4.1 installed). Probably it is because package maintainer desided not to include it into the package for my OS (but I'm not sure).

    I strongly suspect that this pyside6-designer is some script that I may download separately and use. But I have no idea where to get it. May someone give me an advice?
    (Of course I may contact pyside6 package maintainer but I it will take more time I thing and anyway, better to contact him knowing expactly what he missed to include)

    1 Reply Last reply
    0
    • S StarterKit

      The story continues so I would like to keep this topic updated.
      The problem with libPySidePlugin.so import was indeed specific to pyside6 package of Arch Linux and fix was done in pyside6 6.5.1.1-2 release yesterday.

      Now there are no errors in Help/About Plugins menu but there is an error in console instead:

      [user@pc]$ PYSIDE_DESIGNER_PLUGINS=/home/projects/widget_plugins/ 
      [user@pc]$ export PYSIDE_DESIGNER_PLUGINS 
      [user@pc]$ designer6 
      PySide6/__init__.py: Unable to import Shiboken from /home/projects/widget_plugins, /usr/lib/python311.zip, /usr/lib/python3.11, /usr/lib/python3.11/lib-dynload, /usr/lib/python3.11/site-packages 
      qt.pysideplugin: Error running /home/projects/widget_plugins/register_designer_plugins.py: /usr/lib/python3.11/lib-dynload/binascii.cpython-311-x86_64-linux-gnu.so: undefined symbol: _PyUnicode_Ready 
      qt.pysideplugin: No instance of QPyDesignerCustomWidgetCollection was found.
      

      It prevents plugin from loading and seems to be a PySide bug...

      S Offline
      S Offline
      StarterKit
      wrote on last edited by StarterKit
      #15

      And finally it was found that pyside6-designer is included in PySide6-Essentials package that seems to be absent for Arch Linux but was installed on my Windows OS.

      So this is a solution for Linux - you need to install PySide6-Essentials (for Arch Linux it was fixed in package pyside6 6.5.1.1-3)

      But the wrapper itself is rather simple so it appears to be useful even without installation:

      import re
      import sys
      from PySide6.scripts.pyside_tool import designer
      if __name__ == '__main__':
          sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
          sys.exit(designer())
      
      CristianMaureiraC 1 Reply Last reply
      1
      • adrianghcA Offline
        adrianghcA Offline
        adrianghc
        wrote on last edited by
        #2

        Hello there,

        pyside6-designer is a wrapper that calls the actual executable designer, which resides in the PySide6 site-packages directory. Could you answer these questions:

        1. Which OS are you using?
        2. Are you using a virtual environment?
        3. What error, if any, do you get when you execute pyside6-designer?
        4. Can you find pyside6-designer inside the Python environment's binary directory ("bin" on Linux/macOS, "Scripts" on Windows)?
        5. Can you find designerinside the PySide6 directory of the environment (inside "site-packages")?
        6. Do any of your answers to questions 3 to 5 change for other bundled tools like pyside6-assistant/assistant?

        Thank you for helping us help you help us all! ๐Ÿ™‚

        S 1 Reply Last reply
        0
        • adrianghcA adrianghc

          Hello there,

          pyside6-designer is a wrapper that calls the actual executable designer, which resides in the PySide6 site-packages directory. Could you answer these questions:

          1. Which OS are you using?
          2. Are you using a virtual environment?
          3. What error, if any, do you get when you execute pyside6-designer?
          4. Can you find pyside6-designer inside the Python environment's binary directory ("bin" on Linux/macOS, "Scripts" on Windows)?
          5. Can you find designerinside the PySide6 directory of the environment (inside "site-packages")?
          6. Do any of your answers to questions 3 to 5 change for other bundled tools like pyside6-assistant/assistant?

          Thank you for helping us help you help us all! ๐Ÿ™‚

          S Offline
          S Offline
          StarterKit
          wrote on last edited by StarterKit
          #3

          @adrianghc, yes I can.

          1. Arch Linux mainly, but I may try to check on Windows... I have pyside6 installed as a native package from Arch repository, not via pip install.
          2. No
          3. bash: pyside6-designer: command not found that is logical as I don't have this file anywhere on my disk.
          4. No
          5. Yes, the designer itself works fine. I need the launcher as I would like to play with custom widgets - and it is said to work only with launcher (from URL I shared in the first post).
            [user@pc ~]$ which designer
            /usr/bin/designer
          6. This question isn't cleaer for me. I don't use any kind of assistant... I think I haven't seen such package available for my OS and I assumed that pyside6-designer is a part of main pyside6 package.

          And yes, I understand that this is wrapper. This is why I assume I may take it from somewhere and use on my pc (probably with some path and enviroment variable adaptations)

          1 Reply Last reply
          0
          • adrianghcA Offline
            adrianghcA Offline
            adrianghc
            wrote on last edited by
            #4

            I'm trying to replicate on Arch Linux but after installing pyside6 via pacman (and installing "which"), I cannot actually find the designer binary. I'm generally very surprised you'd find designer with that plain name without pyside6 prefix in /usr/bin, not the least because that file doesn't seem to be installed according to https://archlinux.org/packages/extra/x86_64/pyside6/. Did you do anything else besides pacman -S extra/pyside6?

            pyside6-assistant is a bundled tool just like designer, so in order to troubleshoot the problem I was trying to find out whether there is any difference in the behavior you describe between our bundled tools. pyside6-designer is part of the main pyside6 package, yes, and so is pyside6-assistant. What happens if you run pyside6-assistant or assistant, or which assistant?

            S 1 Reply Last reply
            0
            • adrianghcA adrianghc

              I'm trying to replicate on Arch Linux but after installing pyside6 via pacman (and installing "which"), I cannot actually find the designer binary. I'm generally very surprised you'd find designer with that plain name without pyside6 prefix in /usr/bin, not the least because that file doesn't seem to be installed according to https://archlinux.org/packages/extra/x86_64/pyside6/. Did you do anything else besides pacman -S extra/pyside6?

              pyside6-assistant is a bundled tool just like designer, so in order to troubleshoot the problem I was trying to find out whether there is any difference in the behavior you describe between our bundled tools. pyside6-designer is part of the main pyside6 package, yes, and so is pyside6-assistant. What happens if you run pyside6-assistant or assistant, or which assistant?

              S Offline
              S Offline
              StarterKit
              wrote on last edited by
              #5

              Hi @adrianghc,
              It appears you stepped in a right way and I'm sorry to say that I created this mess and forgot about it after an upgrade to Qt6 about year ago. It wasn't fully ready and stable so I kept some packages... And you opened my eyes now:

              [user@pc ~]$ which designer
              /usr/bin/designer
              [user@pc ~]$ pacman -Qo /usr/bin/designer
              /usr/bin/designer is owned by qt5-tools 5.15.7+kde+r1-2
              [user@pc ~]$ 
              

              The same I see in UI menu of Designer: Help->About Qt shows me 5.15.7.

              With regards to assistance - I have exactly the same situation: the assistant is from 5.15.7 and pyside6-assistant is missing.

              I assume the next step is to remove qt5-tools 5.15.7+kde+r1-2 and find the right package for qt6. Most probably it should fix the problem. I'll let you know later (but it might be I'll to to Arch forums/mainteiners to reveal where qt6 designer lives)

              1 Reply Last reply
              0
              • S Offline
                S Offline
                StarterKit
                wrote on last edited by StarterKit
                #6

                Ok, an attempt to remove qt5-tools was not successul as it is required for things like vitrtualbox...
                But I found that I have qt6-tools installed already that actually provides me with things like /usr/bin/designer6, /usr/bin/assistant6 etc.

                It appears that neither https://archlinux.org/packages/extra/x86_64/qt6-tools/ nor https://archlinux.org/packages/extra/x86_64/pyside6/ provides pyside6-designer launcher on ArchLinux. But where it should originally come from to one of these packages?

                1 Reply Last reply
                1
                • adrianghcA Offline
                  adrianghcA Offline
                  adrianghc
                  wrote on last edited by
                  #7

                  I must admit I'm not familiar with the Arch packages, I only knew what they were supposed or not supposed to contain after I opened the file lists. The picture is much clearer now, though.
                  pyside6-designer etc. are included if you install pyside6 via pip, in which case it would lie inside the bin directory of the Python environment you installed it in, see question 4 of my first response.
                  There should be no difference between pyside6-designer and designer6 installed via qt6-tools so if installing PySide via pip is not an option you could just use the latter binary.

                  S 1 Reply Last reply
                  0
                  • adrianghcA adrianghc

                    I must admit I'm not familiar with the Arch packages, I only knew what they were supposed or not supposed to contain after I opened the file lists. The picture is much clearer now, though.
                    pyside6-designer etc. are included if you install pyside6 via pip, in which case it would lie inside the bin directory of the Python environment you installed it in, see question 4 of my first response.
                    There should be no difference between pyside6-designer and designer6 installed via qt6-tools so if installing PySide via pip is not an option you could just use the latter binary.

                    S Offline
                    S Offline
                    StarterKit
                    wrote on last edited by StarterKit
                    #8

                    @adrianghc said in pyside6-designer launcher is absent:

                    There should be no difference between pyside6-designer and designer6 installed via qt6-tools

                    Are you sure in this statement? I should that pyside6-designer should be some kind of script (that calls actual designer binary)... but I see that designer6 is a binary file.

                    1 Reply Last reply
                    0
                    • adrianghcA Offline
                      adrianghcA Offline
                      adrianghc
                      wrote on last edited by adrianghc
                      #9

                      There should be no difference between pyside6-designer and designer6 installed via qt6-tools
                      There should be no difference between the designer binary called by pyside6-designer and designer6 installed via qt6-tools

                      ๐Ÿ™‚

                      S 1 Reply Last reply
                      0
                      • adrianghcA adrianghc

                        There should be no difference between pyside6-designer and designer6 installed via qt6-tools
                        There should be no difference between the designer binary called by pyside6-designer and designer6 installed via qt6-tools

                        ๐Ÿ™‚

                        S Offline
                        S Offline
                        StarterKit
                        wrote on last edited by
                        #10

                        @adrianghc, okey... I still have some doubts but I should give it a try :) - will try to create simple widget next week

                        1 Reply Last reply
                        0
                        • adrianghcA Offline
                          adrianghcA Offline
                          adrianghc
                          wrote on last edited by adrianghc
                          #11

                          I just checked and while not the Arch package, the designer and assistant binaries are identical between the full Qt installation (from the Qt Online Installer) and PySide from pip on my system. ๐Ÿ‘

                          Happy holidays, and good luck with the widgets next week. ๐Ÿ™‚

                          S 1 Reply Last reply
                          1
                          • adrianghcA adrianghc

                            I just checked and while not the Arch package, the designer and assistant binaries are identical between the full Qt installation (from the Qt Online Installer) and PySide from pip on my system. ๐Ÿ‘

                            Happy holidays, and good luck with the widgets next week. ๐Ÿ™‚

                            S Offline
                            S Offline
                            StarterKit
                            wrote on last edited by StarterKit
                            #12

                            @adrianghc Merry Christmas to you! :)
                            But my custom widget jorney isn't successful so far... What I did:

                            1. Starting from this page I took Task Menu Extension (Designer) example.
                            2. As there was no any register*.py file with registerCustomWidget() call I decided to create my own. As DOM_XML is already defined in tictactoeplugin.py my file is pretty simple:
                            from tictactoeplugin import TicTacToePlugin, DOM_XML
                            
                            import QtDesigner
                            
                            QPyDesignerCustomWidgetCollection.registerCustomWidget(TicTacToePlugin, module="tictactoeplugin",
                                                                                   tool_tip="Custom Widget", xml=DOM_XML)
                            
                            1. I set PYSIDE_DESIGNER_PLUGINS environment variable to point to the directory with example. And then ran designer6 from the same command line. The result is nothing, no new widgets are visible in Widget Box :(
                            2. As "Troubleshooting the Qt Designer Plugin" section says I went to Help/About Plugins menu and there is an error indeed:
                              Cannot load library /usr/lib/qt6/plugins/designer/libPySidePlugin.so: (/usr/lib/qt6/plugins/designer/libPySidePlugin.so: undefined symbol: PyImport_AddModule)
                              The library itself is present in my filesystem:
                            [user@pc designer]$ file /usr/lib/qt6/plugins/designer/libPySidePlugin.so
                            /usr/lib/qt6/plugins/designer/libPySidePlugin.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=8cf43238963aab8d4f447e10d026898855e005f4, stripped
                            

                            From the name of file I see that error is related with PySide so I strongly suspect that I need to fix it before any further attempts... But I have no idea what I may do to fix it...
                            My only suspect is - this part of manual was missed when Arch-package was compiled:
                            When building Qt for Python, be sure to set the --standalone option for the plugin to be properly installed.
                            as /usr/lib/qt6/plugins/designer/libPySidePlugin.so is owned by pyside6 6.4.1-2

                            1 Reply Last reply
                            0
                            • S Offline
                              S Offline
                              StarterKit
                              wrote on last edited by
                              #13

                              Meanwhile I tried the same on Windows.
                              Plugin was loaded successfully and appeared in new Custom widgets tab of Widget Box.
                              Menu Help/About Plugins shows that PySidePlugin.dll was loaded successully and TicTacToe appeared under it.

                              So it appears to be a problem of Arch Linux setup...

                              S 1 Reply Last reply
                              0
                              • S StarterKit

                                Meanwhile I tried the same on Windows.
                                Plugin was loaded successfully and appeared in new Custom widgets tab of Widget Box.
                                Menu Help/About Plugins shows that PySidePlugin.dll was loaded successully and TicTacToe appeared under it.

                                So it appears to be a problem of Arch Linux setup...

                                S Offline
                                S Offline
                                StarterKit
                                wrote on last edited by
                                #14

                                The story continues so I would like to keep this topic updated.
                                The problem with libPySidePlugin.so import was indeed specific to pyside6 package of Arch Linux and fix was done in pyside6 6.5.1.1-2 release yesterday.

                                Now there are no errors in Help/About Plugins menu but there is an error in console instead:

                                [user@pc]$ PYSIDE_DESIGNER_PLUGINS=/home/projects/widget_plugins/ 
                                [user@pc]$ export PYSIDE_DESIGNER_PLUGINS 
                                [user@pc]$ designer6 
                                PySide6/__init__.py: Unable to import Shiboken from /home/projects/widget_plugins, /usr/lib/python311.zip, /usr/lib/python3.11, /usr/lib/python3.11/lib-dynload, /usr/lib/python3.11/site-packages 
                                qt.pysideplugin: Error running /home/projects/widget_plugins/register_designer_plugins.py: /usr/lib/python3.11/lib-dynload/binascii.cpython-311-x86_64-linux-gnu.so: undefined symbol: _PyUnicode_Ready 
                                qt.pysideplugin: No instance of QPyDesignerCustomWidgetCollection was found.
                                

                                It prevents plugin from loading and seems to be a PySide bug...

                                S 1 Reply Last reply
                                0
                                • S StarterKit

                                  The story continues so I would like to keep this topic updated.
                                  The problem with libPySidePlugin.so import was indeed specific to pyside6 package of Arch Linux and fix was done in pyside6 6.5.1.1-2 release yesterday.

                                  Now there are no errors in Help/About Plugins menu but there is an error in console instead:

                                  [user@pc]$ PYSIDE_DESIGNER_PLUGINS=/home/projects/widget_plugins/ 
                                  [user@pc]$ export PYSIDE_DESIGNER_PLUGINS 
                                  [user@pc]$ designer6 
                                  PySide6/__init__.py: Unable to import Shiboken from /home/projects/widget_plugins, /usr/lib/python311.zip, /usr/lib/python3.11, /usr/lib/python3.11/lib-dynload, /usr/lib/python3.11/site-packages 
                                  qt.pysideplugin: Error running /home/projects/widget_plugins/register_designer_plugins.py: /usr/lib/python3.11/lib-dynload/binascii.cpython-311-x86_64-linux-gnu.so: undefined symbol: _PyUnicode_Ready 
                                  qt.pysideplugin: No instance of QPyDesignerCustomWidgetCollection was found.
                                  

                                  It prevents plugin from loading and seems to be a PySide bug...

                                  S Offline
                                  S Offline
                                  StarterKit
                                  wrote on last edited by StarterKit
                                  #15

                                  And finally it was found that pyside6-designer is included in PySide6-Essentials package that seems to be absent for Arch Linux but was installed on my Windows OS.

                                  So this is a solution for Linux - you need to install PySide6-Essentials (for Arch Linux it was fixed in package pyside6 6.5.1.1-3)

                                  But the wrapper itself is rather simple so it appears to be useful even without installation:

                                  import re
                                  import sys
                                  from PySide6.scripts.pyside_tool import designer
                                  if __name__ == '__main__':
                                      sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
                                      sys.exit(designer())
                                  
                                  CristianMaureiraC 1 Reply Last reply
                                  1
                                  • S StarterKit has marked this topic as solved on
                                  • S StarterKit

                                    And finally it was found that pyside6-designer is included in PySide6-Essentials package that seems to be absent for Arch Linux but was installed on my Windows OS.

                                    So this is a solution for Linux - you need to install PySide6-Essentials (for Arch Linux it was fixed in package pyside6 6.5.1.1-3)

                                    But the wrapper itself is rather simple so it appears to be useful even without installation:

                                    import re
                                    import sys
                                    from PySide6.scripts.pyside_tool import designer
                                    if __name__ == '__main__':
                                        sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
                                        sys.exit(designer())
                                    
                                    CristianMaureiraC Offline
                                    CristianMaureiraC Offline
                                    CristianMaureira
                                    wrote on last edited by
                                    #16

                                    @StarterKit The main issue here was that the packages provided by different OS are adapted for their needs. We ship Qt for Python officially in wheels, so we expect that the use case is that you create a virtual environment, and pip install pyside6 there and develop your application. The PySide that come in Arch, and other distros don't have a similar structure nor the same goal for users, so I'd always recommend you not to install Python module system-wide and keep them in your virtual environments.

                                    S 1 Reply Last reply
                                    1
                                    • CristianMaureiraC CristianMaureira

                                      @StarterKit The main issue here was that the packages provided by different OS are adapted for their needs. We ship Qt for Python officially in wheels, so we expect that the use case is that you create a virtual environment, and pip install pyside6 there and develop your application. The PySide that come in Arch, and other distros don't have a similar structure nor the same goal for users, so I'd always recommend you not to install Python module system-wide and keep them in your virtual environments.

                                      S Offline
                                      S Offline
                                      StarterKit
                                      wrote on last edited by
                                      #17

                                      Hi @CristianMaureira, yes this is clear.
                                      But it is much more convenient to have all your packages managed by a single packet manager. This is the reason why I prefer to use system-specific packages in case of Arch.
                                      So as result Arch package was improved and I think it is an acceptable outcome.

                                      1 Reply Last reply
                                      0

                                      • Login

                                      • Login or register to search.
                                      • First post
                                        Last post
                                      0
                                      • Categories
                                      • Recent
                                      • Tags
                                      • Popular
                                      • Users
                                      • Groups
                                      • Search
                                      • Get Qt Extensions
                                      • Unsolved