Install PyQt5 on Raspberry Pi

How to Install PyQt5 on Raspberry Pi Raspbian for Python GUI Development
Heads up! You've already completed this tutorial.

Before you start building Python GUI applications with the Raspberry Pi you will need to have a working installation of PyQt5 on your system. If you don't have it set up yet, the following steps will guide you through how to install PyQt5 on Raspberry Pi Raspbian.

Note that the following instructions are only for installation of the GPL licensed version of PyQt. If you need to use PyQt in a non-GPL project you will need to purchase an alternative license from Riverbank Computing to release your software.

Install PyQt5 on Raspberry Pi Raspbian

Installation of PyQt5 on Raspberry Pi is very straightforward as packages are available in the Raspbian repositories. You can install PyQt5 from the command line using apt. The package you are looking for is named python3-pyqt5.

Run the following command in a terminal to install PyQt5 on your Raspberry Pi:

sh
sudo apt install python3-pyqt5

Verify the PyQt5 Installation

After the install is finished, you should verify that PyQt5 is working correctly. Open a terminal and run python3, then import PyQt5. If no errors appear, the installation was successful.

python
Python 3.7.6
Type "help", "copyright", "credits" or "license" for more information.
>>> import PyQt5
>>>

You can now start creating Python GUI applications with PyQt5.

1:1 Coaching & Tutoring for your Python GUIs project
Martin Fitzpatrick Python GUIs Coaching & Training
60 mins ($195) Book Now

1:1 Python GUIs Coaching & Training

Comprehensive code reviewBugfixes & improvements • Maintainability advice and architecture improvements • Design and usability assessment • Suggestions and tips to expand your knowledgePackaging and distribution help for Windows, Mac & Linux • Find out more.

Well done, you've finished this tutorial! Mark As Complete
[[ user.completed.length ]] completed [[ user.streak+1 ]] day streak
Martin Fitzpatrick

Install PyQt5 on Raspberry Pi was written by Martin Fitzpatrick.

Martin Fitzpatrick has been developing Python/Qt apps for 8 years. Building desktop applications to make data-analysis tools more user-friendly, Python was the obvious choice. Starting with Tk, later moving to wxWidgets and finally adopting PyQt. Martin founded PythonGUIs to provide easy to follow GUI programming tutorials to the Python community. He has written a number of popular Python books on the subject.