How to install pyqt5 in jetson xavier ?

How install pyqt5 in jetson xavier ? sudo pip3 install pyqt5 ,but I can’t install it.


Suppose you can install it with this command:

sudo apt-get install python-qt5


This command did not work for me, I can only find python-qt4 in apt-get, No sign of qt5, not even after updating apt-get?
Even on Jetpack 4.0, I don’t see “python-qt5”, only python-qt4.


Have you tried the following:

sudo apt-get install python3-pyqt5

OK after much tinkering I discovered how to get PyQt5 to work on the Xavier. If you want pyqt5 for 3.6 on Xavier you actually have to compile the source here is the steps I did to get it to work.

sudo apt-get install qt5-default pyqt5-dev pyqt5-dev-tools
sudo apt-get install python3-pyqt5
pip3 install --upgrade pip
# if pip3 needs fix

pip3 install --upgrade setuptools
sudo apt-get install qttools5-dev-tools

# If you have an old version of SIP
[s]sudo apt-get remove python3-sip
sudo apt-get autoremove[/s]

# Install sip
# Download Sip source
sudo make install

# Install pyqt5 source
# download PyQt5 source
sudo make install

pip3 install --user PyQt5

# Install remaining widgets from apt-get
# ie multimedia
sudo apt-get install python3-pyqt5.qtmultimedia

This code might need some editing but this will get you most of the way to getting pyqt5 to work on Xavier with python36. After the first compile it did not create sips for QtMultimedia Widgets… Which I need I uninstalled the old sip and recompiling at the moment, takes a couple hours to compile.

After recompiling, do not remove the sip from dpkgs. download seperate qt widgets you need, the PyQt5 source is only the source for the QtCore modules…

Thanks for the check. In the off chance anyone needs to play mp4 videos in QtPy5. you will need to download the “ubuntu-restricted-extras” along with “libqt5multimedia5-plugins”.