How to install pyqt5 in jetson xavier ?

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

Hi,

Suppose you can install it with this command:

sudo apt-get install python-qt5

Thanks.

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.

Hi

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
#https://stackoverflow.com/questions/28210269/importerror-cannot-import-name-main-when-running-pip-version-command-in-window

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
#https://pypi.org/project/SIP/
#https://askubuntu.com/questions/609245/error-make-sure-you-have-a-working-sip-on-your-path-or-use-the-sip-argument-t/666336#666336
# Download Sip source
python3 configure.py
make
sudo make install

# Install pyqt5 source
#https://www.riverbankcomputing.com/static/Docs/PyQt5/installation.html
# download PyQt5 source
python3 configure.py
make
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.

Update
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”.