pyside6-designer launcher is absent
-
Hi all,
I'm looking forward to create a custom widget and use it with QtDesigner as described here.
This link refers topyside6-designerlauncher 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-designeris 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 contactpyside6package maintainer but I it will take more time I thing and anyway, better to contact him knowing expactly what he missed to include) -
The story continues so I would like to keep this topic updated.
The problem withlibPySidePlugin.soimport was indeed specific topyside6package of Arch Linux and fix was done inpyside6 6.5.1.1-2release 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...
And finally it was found that
pyside6-designeris included inPySide6-Essentialspackage 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()) -
Hello there,
pyside6-designeris a wrapper that calls the actual executabledesigner, which resides in the PySide6 site-packages directory. Could you answer these questions:- Which OS are you using?
- Are you using a virtual environment?
- What error, if any, do you get when you execute
pyside6-designer? - Can you find
pyside6-designerinside the Python environment's binary directory ("bin" on Linux/macOS, "Scripts" on Windows)? - Can you find
designerinside the PySide6 directory of the environment (inside "site-packages")? - 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! ๐
-
Hello there,
pyside6-designeris a wrapper that calls the actual executabledesigner, which resides in the PySide6 site-packages directory. Could you answer these questions:- Which OS are you using?
- Are you using a virtual environment?
- What error, if any, do you get when you execute
pyside6-designer? - Can you find
pyside6-designerinside the Python environment's binary directory ("bin" on Linux/macOS, "Scripts" on Windows)? - Can you find
designerinside the PySide6 directory of the environment (inside "site-packages")? - 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! ๐
@adrianghc, yes I can.
- Arch Linux mainly, but I may try to check on Windows... I have
pyside6installed as a native package from Arch repository, not viapip install. - No
bash: pyside6-designer: command not foundthat is logical as I don't have this file anywhere on my disk.- No
- 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 - 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-designeris a part of mainpyside6package.
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)
-
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
designerwith 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 besidespacman -S extra/pyside6?pyside6-assistantis a bundled tool just likedesigner, 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-designeris part of the mainpyside6package, yes, and so ispyside6-assistant. What happens if you runpyside6-assistantorassistant, orwhich assistant? -
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
designerwith 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 besidespacman -S extra/pyside6?pyside6-assistantis a bundled tool just likedesigner, 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-designeris part of the mainpyside6package, yes, and so ispyside6-assistant. What happens if you runpyside6-assistantorassistant, orwhich assistant?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 Qtshows me 5.15.7.With regards to
assistance- I have exactly the same situation: theassistantis from 5.15.7 and pyside6-assistant is missing.I assume the next step is to remove
qt5-tools 5.15.7+kde+r1-2and 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) -
Ok, an attempt to remove
qt5-toolswas not successul as it is required for things likevitrtualbox...
But I found that I haveqt6-toolsinstalled already that actually provides me with things like/usr/bin/designer6,/usr/bin/assistant6etc.It appears that neither https://archlinux.org/packages/extra/x86_64/qt6-tools/ nor https://archlinux.org/packages/extra/x86_64/pyside6/ provides
pyside6-designerlauncher on ArchLinux. But where it should originally come from to one of these packages? -
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-designeretc. are included if you installpyside6viapip, in which case it would lie inside thebindirectory of the Python environment you installed it in, see question 4 of my first response.
There should be no difference betweenpyside6-designeranddesigner6installed viaqt6-toolsso if installing PySide via pip is not an option you could just use the latter binary. -
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-designeretc. are included if you installpyside6viapip, in which case it would lie inside thebindirectory of the Python environment you installed it in, see question 4 of my first response.
There should be no difference betweenpyside6-designeranddesigner6installed viaqt6-toolsso if installing PySide via pip is not an option you could just use the latter binary.@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-designershould be some kind of script (that calls actualdesignerbinary)... but I see thatdesigner6is a binary file. -
There should be no difference between pyside6-designer and designer6 installed via qt6-tools
There should be no difference between thedesignerbinary called bypyside6-designeranddesigner6installed via qt6-tools๐
@adrianghc, okey... I still have some doubts but I should give it a try :) - will try to create simple widget next week
-
I just checked and while not the Arch package, the
designerandassistantbinaries are identical between the full Qt installation (from the Qt Online Installer) and PySide frompipon my system. ๐Happy holidays, and good luck with the widgets next week. ๐
-
I just checked and while not the Arch package, the
designerandassistantbinaries are identical between the full Qt installation (from the Qt Online Installer) and PySide frompipon my system. ๐Happy holidays, and good luck with the widgets next week. ๐
@adrianghc Merry Christmas to you! :)
But my custom widget jorney isn't successful so far... What I did:- Starting from this page I took Task Menu Extension (Designer) example.
- As there was no any
register*.pyfile withregisterCustomWidget()call I decided to create my own. AsDOM_XMLis already defined intictactoeplugin.pymy file is pretty simple:
from tictactoeplugin import TicTacToePlugin, DOM_XML import QtDesigner QPyDesignerCustomWidgetCollection.registerCustomWidget(TicTacToePlugin, module="tictactoeplugin", tool_tip="Custom Widget", xml=DOM_XML)- I set
PYSIDE_DESIGNER_PLUGINSenvironment variable to point to the directory with example. And then randesigner6from the same command line. The result is nothing, no new widgets are visible in Widget Box :( - 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, strippedFrom 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--standaloneoption for the plugin to be properly installed.
as /usr/lib/qt6/plugins/designer/libPySidePlugin.so is owned by pyside6 6.4.1-2 -
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 thatPySidePlugin.dllwas loaded successully andTicTacToeappeared under it.So it appears to be a problem of Arch Linux setup...
-
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 thatPySidePlugin.dllwas loaded successully andTicTacToeappeared under it.So it appears to be a problem of Arch Linux setup...
The story continues so I would like to keep this topic updated.
The problem withlibPySidePlugin.soimport was indeed specific topyside6package of Arch Linux and fix was done inpyside6 6.5.1.1-2release 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...
-
The story continues so I would like to keep this topic updated.
The problem withlibPySidePlugin.soimport was indeed specific topyside6package of Arch Linux and fix was done inpyside6 6.5.1.1-2release 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...
And finally it was found that
pyside6-designeris included inPySide6-Essentialspackage 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()) -
S StarterKit has marked this topic as solved on
-
And finally it was found that
pyside6-designeris included inPySide6-Essentialspackage 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())@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 pyside6there 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. -
@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 pyside6there 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.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.