

I just don’t like adulterating the system installation of Python anymore.

It all works with your regular security permissions (no sudo), and if you want to blow it away, it’s very easy to do so. I would strongly recommend you always work within a Python virtual environment. From there you can work with PyQt5 within that virtual Python environment.
Install pyqt5 on raspberry pi install#
And as you want to develop in Python 3, you need to specify the version of Python you are using each time and that is annoying So, lets install the 3.9 version and make it. Once it’s done, it should announce it’s successful. The Raspberry Pi OS is the Foundation’s official supported operating system and comes pre-installed with 2 versions of Python. You might as well go off and do house work or watch an episode or two of your favorite streaming shows, because this is going to take a while (as in hours). Within the virtual environment, do a simple pip install pyqt5.
Attached is an example of what I have tried: raspberrypi: python 01-Window.py Traceback (most recent call last): File '01-Window.py', line 9, inI have not been able to successfully install an SIP package or PtQt4. That’s another reason I like virtual environments it’s incredibly easy to keep multiple Python versions on hand. I wish to install PyQt4 on a Raspberry Pi unit using the lattest Raspbian and Python 2.7 or Python 3. I’ve since moved up to Python 3.8.5, and I’m getting ready to install Python 3.9 alongside 3.8.5 when it’s officially released. With Qt5 default installed, activate the Python 3.8 virtual environment. That gives all the basic tools and support libraries. The problem with 'python3-pyqt5' is that it is missing 'QtWebEngineWidgets', that I need to run ADMBrowser. You do that with sudo apt install qt5-default. 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). However, before we really get started, you’ll need to install the basic Qt5 development tools, otherwise PyQt5 won’t install.
Install pyqt5 on raspberry pi how to#
I’d documented how to build Python from scratch as well as create a working virtual environment here:, so I won’t go through that again. I’m starting from my Python 3.8 installation inside an activated Python virtual environment. And thus I decided to try to run with the latest PyQt5 on the latest Python 3 release. While the Xavier is ostensibly for machine learning prototyping and development, the fact it’s based on Ubuntu 18.04.5, ported onto Nvidia’s six core ARM chip, makes it too tempting for me just to use for ML. Except this time, I used JetPack 4.4 on the Nvidia Xavier NX Developer Kit. Until now.įor whatever reason I decided to try again. That obviously didn’t work out, and I left the whole thing alone. There were problems I’d discovered in the installed repo version, and I’d wanted to create a development environment where I could investigate, and if possible, try to fix any of those problems, with an eye towards pushing any fixes back up stream. My primary reason to build the latest Qt was to step up the Qt version used in PyQt5. Back in September 2019 I wrote how I failed to build Qt 5.13 from its C++ source, which was the latest Qt release at that time(see ).
