Install PyQt6 on Ubuntu Linux

Install PyQt6 on Ubuntu and other Debian-based Linux distributions
Heads up! You've already completed this tutorial.

Before you start the PyQt6 tutorial you will need to have a working installation of PyQt6 on your system. If you don't have either set up yet, the following steps will guide you through how to do this on Linux.

This guide is also available for macOS and Windows.

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 PyQt6 with pip

The simplest way to install PyQt6 on Linux is to use Python's pip packaging tool, just as for other packages. For Python3 installations this is usually called pip3.

bash
pip3 install pyqt6

Install PyQt6 via apt

Packages for PyQt6 are available in the repositories of most distributions, although they may sometimes be out of date. Check first to ensure you're getting an up to date version, and if not use the pip method above. In Ubuntu you can install either from the command line or via "Software Center". The package you are looking for is named python3-pyqt6.

You can also install these from the command line as follows --

bash
sudo apt install python3-pyqt6

After install is finished, you should be able to run python (or python3) and import PyQt6 without errors.

PyQt/PySide 1:1 Coaching with Martin Fitzpatrick — Get one on one help with your Python GUI projects. Working together with you I'll identify issues and suggest fixes, from bugs and usability to architecture and maintainability.

More info 60 mins ($195)

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

You can now start creating Python GUI applications with PyQt6.

Over 10,000 developers have bought Create GUI Applications with Python & Qt!
Create GUI Applications with Python & Qt6
Take a look

Downloadable ebook (PDF, ePub) & Complete Source code

Also available from Leanpub and Amazon Paperback

[[ discount.discount_pc ]]% OFF for the next [[ discount.duration ]] [[discount.description ]] with the code [[ discount.coupon_code ]]

Purchasing Power Parity

Developers in [[ country ]] get [[ discount.discount_pc ]]% OFF on all books & courses with code [[ discount.coupon_code ]]
Well done, you've finished this tutorial! Mark As Complete
[[ user.completed.length ]] completed [[ user.streak+1 ]] day streak

Install PyQt6 on Ubuntu Linux was written by Martin Fitzpatrick with contributions from Punition Chaetognathan .

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.