Installing PySide 2 for Ubuntu 18.04
JonB last edited by JonB
I presently have a working system:
- Ubuntu 18.04 LTS
- Python 3.6.8 (released with Ubuntu 18.04)
- Qt 5.9.5 (released with Ubuntu 18.04 via
- PyQt 5.10.1 (don't recall whether
apt-getor direct download)
I should like to play around with PySide 2 now :)
Reading https://wiki.qt.io/Qt_for_Python/GettingStarted, I note:
Qt: 5.12 is recommended, but there are Technical Preview wheels for 5.11
Will I indeed need to move to Qt 5.11/12 to get anywhere? Am I whistling in the wind hoping PySide 2 would work with my current Qt?
I definitely do not wish to compile anything, neither Qt nor PySide2.
I do not believe in Virtual Environments.
Is there any successful
apt-get install python3-pyside2stuff?
Do I have to do PySide2 via
pip3? I tried
pip3installing of stuff in the past (Qt? PyQt?). Despite all the documentation/examples showing what to do this way and saying it would be fine, it ended up simply not working/crashing/missing stuff, because it did not know/deal with its dependencies correctly (SSL library stuff among others, I think), and at that point I gave up on it since it simply did not live up to its promises (have never had any problem with
apt-getapproach getting things right). But I'll (have to) try again with
pip3if that's the way to go.
I f I do succeed in doing this all, will it interfere with the working Qt + PyQt system I currently have? I had thought the PySide 2 would be quite separate from the PyQt 5, but I saw somewhere (can't find it now) some post implying you had to keep them apart or something in PySide 2 would overwrite/interfere with something in PyQt.
Anyone with any experience of this? What steps did you follow to get your PySide 2 all working under Linux, please?
iamMHZ last edited by
these links might help :
GF GEPI last edited by
pip3 install PySide2will do it.
JonB last edited by
Yes, in the end I did have to do it via
That in itself worked. However, unfortunately it has left me stuck whereby once I have PySide2 installed existing PyQt5 projects which I have can no longer be run under the debugger because of it finding some PySide2 stuff even though the projects do not use PySide2 at all. For my use case, that makes it so I cannot afford to install PySide2 at all for other projects :( I have posted about this to https://bugreports.qt.io/browse/PYSIDE-1080 in the QT BUG forum for PySide2, but nobody has replied about it, so I'm completely stuck at present... :( :( If anyone cares to read that and comment here or there that would be great!
Denni 0 last edited by
You could create a virtual machine under which you use PySide2 and use PyQt under a different virtual machine or you base machine if you need to be using PySide2 for some licensing reason.
JonB last edited by
You may be right about that, I don't know, I don't like these "virtual environments", so I have never created one.
The problem I am reporting ("can't load
QMYSQL") only occurs when I try to run inside the PyCharm debugger, not if I just run the apps outside. That confuses me, as it seems it's not the environment the program has which causes the problem, rather it's to do with environment/search paths being used by PyCharm debugger which is somehow (incorrectly) picking up (certain) files from the completely unrelated environment, and then complaining. Given this, I am quite unsure who needs the venv, maybe it's just the PyCharm environment, goodness knows. Sigh :(