sisma
Posts: 7
Joined: Sun Oct 27, 2019 11:56 am

How to install PyQt5 v.5.5 or higher on Raspbian Buster

Wed Nov 27, 2019 8:39 pm

Hello,
I'm getting crazy about installing latest version of PyQt5 (Python 3) on latest version of Raspbian.
All posts that I have found on internet about this are obsolete.

Can you help me?
Last edited by sisma on Wed Nov 27, 2019 10:42 pm, edited 1 time in total.

fruitoftheloom
Posts: 27225
Joined: Tue Mar 25, 2014 12:40 pm

Re: How to install PyQt5 v.5.5 or higher on Raspbian Buster

Wed Nov 27, 2019 9:00 pm

sisma wrote:
Wed Nov 27, 2019 8:39 pm
Hello,
I'm getting crazy about installing latest version of PyQt5 on latest version of Raspbian.
All posts that I have found on internet about this are obsolete.

Can you help me?

Fully updated Raspbian Buster should have version 5.11 in the repositories ???

You need to decide between Python 2 or 3, though Python3 is the currently developed branch:

https://packages.debian.org/source/buster/pyqt5
Take what I advise as advice not the utopian holy grail, and it is gratis !!

Heater
Posts: 19062
Joined: Tue Jul 17, 2012 3:02 pm

Re: How to install PyQt5 v.5.5 or higher on Raspbian Buster

Wed Nov 27, 2019 9:49 pm

Help us to help you. Just saying "something does not work" is not giving us much to go on now is it?.

Are you saying that a simple:

Code: Select all

$ sudo apt-get install python3-pyqt5
or

Code: Select all

$ sudo apt-get install python-pyqt5
if you want the old version, did not work?

If so, what error message(s) did you get.

You should probably do this first just to be up to date:

Code: Select all

$ sudo apt-get update
$ sudo apt-get upgrade
Memory in C++ is a leaky abstraction .

sisma
Posts: 7
Joined: Sun Oct 27, 2019 11:56 am

Re: How to install PyQt5 v.5.5 or higher on Raspbian Buster

Wed Nov 27, 2019 10:48 pm

Heater wrote:
Wed Nov 27, 2019 9:49 pm
Help us to help you. Just saying "something does not work" is not giving us much to go on now is it?.
Sorry, you are right but I have tried so many ways that I was unable to tell what was the problem for each solution I tried.
Are you saying that a simple:

Code: Select all

$ sudo apt-get install python3-pyqt5
or

Code: Select all

$ sudo apt-get install python-pyqt5
if you want the old version, did not work?

If so, what error message(s) did you get.
I have updated my post adding information about Python version.

As I said, I have tried several way to install PyQt5, including downloading previous versions and run make/make install and installing "sip", as described in some answers (like this and this).
The problem with "python3-pyqt5" is that it is missing "QtWebEngineWidgets", that I need to run ADMBrowser. And running...

Code: Select all

pip3 install PyQtWebEngine
...as described here, gives me this error:
Could not find a version that satisfies the requirement PyQtWebEngine (from versions: )
No matching distribution found for PyQtWebEngine
You should probably do this first just to be up to date:

Code: Select all

$ sudo apt-get update
$ sudo apt-get upgrade
Yes, I did it.

K9spud
Posts: 29
Joined: Fri Nov 22, 2019 5:38 am

Re: How to install PyQt5 v.5.5 or higher on Raspbian Buster

Thu Nov 28, 2019 4:05 am

sisma wrote:
Wed Nov 27, 2019 10:48 pm
The problem with "python3-pyqt5" is that it is missing "QtWebEngineWidgets", that I need to run ADMBrowser. And running...
From what I can tell, Qt 5.11.3 currently in the Raspbian 10 buster repo doesn't provide a package for the QtWebEngine component... Which is really weird because it does provide "libqt5webengine-data" and "qtwebengine5-doc" packages, which sound like parts and pieces of QtWebEngine. Obviously whoever compiled Qt for Raspbian 10 buster must have managed to get QtWebEngine to compile, because Qt Creator uses QtWebEngine internally for the help system.

It's as if there is another .dpkg file out there on someone's build machine that didn't get uploaded into the Raspbian 10 buster repo...

Code: Select all

pi@rpi4:~ $ sudo apt-get install libqt5webenginecore5
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package libqt5webenginecore5 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'libqt5webenginecore5' has no installation candidate
FYI: If you try compiling Qt from the source code tarball to build QtWebEngine yourself, try using clang instead of gcc -- you'll save yourself a lot of time even though clang is a generally slower compiler from what I can tell. The buster version of gcc v8.3.0 threw an "internal compiler error" part way through compiling QtWebEngine for me. Gcc v9.2.0 has the bug fixed, but you'd have to compile that from source...

plugwash
Forum Moderator
Forum Moderator
Posts: 3766
Joined: Wed Dec 28, 2011 11:45 pm

Re: How to install PyQt5 v.5.5 or higher on Raspbian Buster

Thu Nov 28, 2019 1:42 pm

The -data and -doc packages are architecture independent and so are imported from Debian unmodified.

Some versions of the architecture dependent packages from qtwebengine did build for raspbian, but were not allowed into the archive because armv7 contamination was detected. If you don't care about armv6 compatibility you can probablly use the packages from Debian armhf.

qtcreator in debian/raspbian seems to use qtwebkit, not qtwebengine.

sisma
Posts: 7
Joined: Sun Oct 27, 2019 11:56 am

Re: How to install PyQt5 v.5.5 or higher on Raspbian Buster

Fri Nov 29, 2019 2:47 pm

So, there is not solution for latest version of Raspbian, am I right?

vojtechvu
Posts: 3
Joined: Mon Oct 26, 2020 10:34 pm

Re: How to install PyQt5 v.5.5 or higher on Raspbian Buster

Mon Oct 26, 2020 10:52 pm

Please find this solution below - this is last known version of PyQt on Riverbankcomputing website, unfortunately version 5.15
If you want to download PyQT6 please change link on:
PyQt6-6.0.0.dev2010251533.tar.gz
https://www.riverbankcomputing.com/stat ... 533.tar.gz

Code: Select all

# ## Qt5 # # #
sudo apt-get install qt5-default pyqt5-dev pyqt5-dev-tools

# # # SIP # # #
wget https://www.riverbankcomputing.com/static/Downloads/sip/4.19.24/sip-4.19.24.tar.gz
tar -xzvf sip-4.19.24.tar.gz
cd sip-4.19.24
python configure.py
make
make install
# # # # # #

# # # PyQt5 # # #
cd ../
sudo wget https://www.riverbankcomputing.com/static/Downloads/PyQt5/PyQt5-5.15.2.dev2010041344.tar.gz
sudo tar -xzvf PyQt5-5.15.2.dev2010041344.tar.gz
cd PyQt5-5.15.2.dev2010041344
sudo python configure.py
sudo make
make install
# # # # # #
pip install PyQt5-sip
# # # # # #

Return to “General discussion”