This issue was finally resolved, thanks to DaneLLL’s help.
Here is the method to build Qt5 (and then PySide2 if you need Qt for Python) from source on Jetson devices:
-
Download Qt source:
if you need the whole Qt5 (~900MB):wget http://master.qt.io/archive/qt/5.15/5.15.2/single/qt-everywhere-src-5.15.2.tar.xz
or
qtbase (basic module such as QtCore, QtGui and QtWidget)(~90MB):wget http://master.qt.io/archive/qt/5.15/5.15.2/submodules/qtbase-everywhere-src-5.15.2.tar.xz
-
configure and install Qt5 (here I used qtbase):
tar -xpf qtbase-everywhere-src-5.15.2.tar.xz
cd qtbase-everywhere-src-5.15.2/
./configure -xcb(must enable xcb here manually)
Choose “o” to install Qt open source version.make -j4
sudo make install -
Now we have Qt5 under /usr/local/Qt-5.15.2
-
Before install PySide2, first we have to deal with some requirements:
General requirements: Python: 3.5+, Qt: 5.12+, libclang: version10, CMake:3.1+, llvm: version10Here I personally suggest use synaptic to manage library:
sudo apt-get install synaptic
Then install the correct version of libclang and llvm via synaptic.
-
Download and build PySide2:
git clone http://code.qt.io/pyside/pyside-setup.git
cd pyside-setup/
git checkout 5.15.2I’m not sure whether the version of Qt5 and PySide2 must match. Anyway, here I used PySide2 5.12.2
Finally, to install PySide2:
sudo python setup.py install --qmake=/usr/local/Qt-5.15.2/bin/qmake
(qmake is automatically installed with Qt5)
-
Try PySide2 in Python:
python
from PySide2 import *