tl;dr
Voila!
wut?
Installing pyside2-tools
without manually editing /usr/bin/pyside2-uic
as suggested by edwinksl's prior answer results in a fatal exception on running pyside2-uic
:
$ pyside2-uic
Traceback (most recent call last):
File "/usr/bin/pyside2-uic", line 28, in <module>
from pyside2uic.driver import Driver
ImportError: No module named pyside2uic.driver
The reason why appears to be that the PySide2 PPA installs the pyside2uic
package for Python 3 but not Python 2.
Even if this PPA did correctly install the pyside2uic
package for both, however, the resulting pyside2-uic
script would still only be usable by Python 2 users. Python 3 users would be hung out to dry. Since Python 2 is nearing its end-of-life, that would be bad.
Ultimately, the only viable long-term solution is for this PPA to provide two different packages:
python3-pyside-tools
, providing Python 3-specific PySide 2 utilities with Python 3-specific filenames (e.g., /usr/bin/pyside2-uic-py3
).
python2-pyside-tools
, providing Python 2-specific PySide 2 utilities with Python 2-specific filenames (e.g., /usr/bin/pyside2-uic-py2
).
Python 2 and 3 are two distinct languages. You gotta keep 'em separated.
Until that wondrous day, the above solution will have to do. Thanks for all the PySide 2 packaging, Thomas Karl Pietrowski .
apt-get add-apt-repository -y ppa:thopiekar/pyside-git
should readadd-apt-repository -y ppa:thopiekar/pyside-git
on Ubuntu 16.04. – HappyCactus Sep 14 '17 at 14:07