Build Python Desktop Apps with PyQt
PyQt connects the Python you already know to Qt, the trusted C++ toolkit behind thousands of desktop apps. You design your interface once. It then runs natively on Windows, macOS and Linux, with real widgets, a drag-and-drop designer and over a thousand ready-made classes. One pip command opens your first window today.
What Is PyQt?
Think of PyQt as the bridge between the language you genuinely enjoy writing and a graphics toolkit that has quietly powered shipping software for more than two decades.
At its heart, PyQt lets you build full desktop apps in pure Python. It is a well-kept set of Python bindings for Qt — the same C++ framework that drives software across the industry — built and supported by Riverbank Computing. Through PyQt, over a thousand Qt classes become plain Python objects. Windows, buttons, tables, charts and dialogs are only a few lines away, and you never touch C++.
The idea behind it is refreshingly simple. You write plain Python, and Qt draws a clean, native-looking screen for you. There is no web stack to set up, no browser to ship and no new markup to learn. You just create objects, arrange them in a layout, and connect them to your own logic.
That rare mix of power and stability is why PyQt has lasted so long. It stays fast and keeps a steady API. It also tracks every new Qt release, so the skills you build today still pay off tomorrow. Have you outgrown Python's built-in tkinter? PyQt is the natural next step. It scales with you from a tiny one-file utility to a large app with background threads, live charts and a full database.
PyQt = Python + Qt
Thin bindings that map Qt's C++ API onto clean, Pythonic classes.
Latest is PyQt6
Built on Qt 6.11; PyQt5 remains for Qt 5 and older Python.
Maintained & stable
Regular releases track every new Qt version from Riverbank.
PyQt Features
From a single button to a full data dashboard, PyQt grows with whatever you set out to build.
1000+ widgets, ready to drop in
Buttons, tables, trees, tabs, dialogs, sliders, charts — the entire Qt widget set is right here. And you drive every piece of it from clean, readable Python classes.
Native speed under the hood
Qt sits on a fast C++ core, so your PyQt app stays quick and smooth. Even thousands of table rows or live, real-time plots are no problem.
Design your UI visually
Drag widgets onto a canvas in Qt Designer, save the result as a .ui file, then load it straight into your Python code — no tedious hand-placing required.
Signals & slots that just click
Qt's signals and slots make wiring up actions easy. A click becomes a single line — button.clicked.connect(handler) — and the same pattern scales to an app of any size.
One codebase, three systems
Write your app once and run it on Windows, macOS and Linux. Qt draws native-looking controls on each platform, so your software feels at home everywhere.
Powerful add-on modules
Need more than widgets? Reach for optional modules like Charts, 3D, WebEngine, multimedia, SQL and networking. Each one is a small, focused add-on you pull in only when a project needs it.
How PyQt Works
Every PyQt program, large or small, follows the same four-beat rhythm. Learn it once and everything else is just detail you fill in.
Create an application object
Every PyQt program starts with one QApplication. It manages the event loop and app-wide settings.
Build your widgets
Add windows and controls — QWidget, QPushButton, QTableWidget. Then arrange them with layouts.
Connect signals to slots
Wire user actions to your functions, e.g. button.clicked.connect(handler). This is how the app reacts.
Show it and run the loop
Call widget.show() and app.exec(). Qt takes over. It draws the UI and handles events.
How to Install PyQt
pip is the recommended way to install PyQt6 on every platform. Pick your operating system below and copy the commands as they are.
# 1. check Python 3.10+ is installed python --version # 2. install PyQt6 from PyPI pip install PyQt6 # 3. (optional) the designer & tools pip install pyqt6-tools
# 1. check Python 3.10+ python3 --version # 2. install PyQt6 pip3 install PyQt6 # 3. optional tools pip3 install pyqt6-tools
# 1. system Python 3.10+ recommended python3 --version # 2. install from PyPI (a venv is ideal) pip install PyQt6 # or use your distro package sudo apt install python3-pyqt6
Working in a virtual environment keeps PyQt isolated from other projects. Create one with python -m venv venv, then activate it before running pip.
Verify the install
Run python -c "import PyQt6; print(PyQt6.QtCore.PYQT_VERSION_STR)" to confirm the version.
Write hello world
Save the three-line snippet from the hero into app.py and run python app.py.
Open Qt Designer
After pyqt6-tools, launch it with pyqt6-tools designer to build UIs visually.
PyQt Use Cases
PyQt is no toy. It quietly powers software used by millions, plus countless in-house tools you will never hear about — these are just a few of the shapes it takes.









Download PyQt
The fastest way to install PyQt is a single line: pip install PyQt6. Prefer the docs offline? Download the full PyQt6 documentation pack as a ZIP, right here on pyqt.app.
The ZIP contains the open PyQt6 documentation from GitHub. For the library itself, always use pip or the official Riverbank site.
PyQt Compatibility & Comparison
PyQt and PySide6 both wrap the very same Qt. So the real choice comes down to licensing, versions and support. Here is how PyQt stacks up against PySide6, and across its own releases.
| Feature | PyQt6 | PyQt5 | PySide6 |
|---|---|---|---|
| Qt version | Qt 6.x | Qt 5.x | Qt 6.x |
| Maintainer | Riverbank | Riverbank | The Qt Company |
| License | GPL v3 / commercial | GPL v3 / commercial | LGPL v3 |
| Min. Python | 3.10+ | 3.8+ | 3.9+ |
| Ship closed-source free | No | No | Yes |
| API style | Near-identical | Near-identical | Near-identical |
| Qt Designer | Yes | Yes | Yes |
| Best for | New apps | Legacy / Qt 5 | Permissive license |
Choose PyQt6
For new projects on current Qt, with the latest widgets and long-term support.
Choose PyQt5
Only if you must stay on Qt 5 or support older Python versions.
Choose PySide6
If you need the LGPL license to ship proprietary software without a commercial fee.
PyQt Troubleshooting
Hit an error during install or your first run? Start here.
“No module named PyQt6”
pip installed into the wrong Python. Run python -m pip install PyQt6. Now pip matches the Python you use.
“Could not find Qt platform plugin ‘xcb’”
On Linux, install the system libs: sudo apt install libxcb-cursor0 (and related xcb packages) then rerun your app.
pip can’t build / wheel error
Upgrade pip first: python -m pip install --upgrade pip. PyQt6 ships prebuilt wheels, so an up-to-date pip avoids a from-source build.
Blank or crashing window
Keep a reference to QApplication. Call app.exec() last. If the app object is lost, the window closes at once.
Designer won’t open
Install the tools package: pip install pyqt6-tools, then run pyqt6-tools designer. On some setups Designer ships with the Qt install instead.
Mixing PyQt5 and PyQt6
Never import both in one app. Pick one major version; their modules and enums are not interchangeable.
PyQt System Requirements
Requirements are light — if you can run Python, you can almost certainly run PyQt.
PyQt6 6.11 dropped Python 3.9. Use 3.10+ (64-bit recommended).
64-bit Windows, recent macOS, or a mainstream Linux distro.
The PyQt6 wheel bundles the needed Qt libraries.
Any machine that runs a modern browser is more than enough.
Upgrade pip to pull prebuilt wheels instead of building from source.
No separate Qt install needed when using pip wheels.
Is PyQt Safe to Use?
Yes — when you get it from the right places. Follow these simple rules.
Install from PyPI
Use pip install PyQt6. PyPI packages are published by Riverbank Computing.
Check the package name
It is exactly PyQt6. Watch out for typo-squatted look-alike packages.
Avoid random mirrors
Skip unofficial “free download” sites bundling installers you did not ask for.
Open source & auditable
PyQt is GPL v3. Anyone can read the code and see how it is built.
PyQt Pros & Cons
Weigh the strengths against the trade-offs before you commit.
Pros
- Mature, stable toolkit backed by Qt
- Huge widget set and add-on modules
- True cross-platform with native look
- Visual design with Qt Designer
- Free under GPL v3, installs via pip
Cons
- GPL means a paid license to ship closed-source
- Large download compared to lightweight toolkits
- Steeper learning curve for beginners
- Packaging to a single EXE needs extra tools
- Not aimed at mobile or the web
PyQt FAQs — Frequently Asked Questions
Quick answers to the things people ask most about PyQt.
General
PyQt is a set of Python bindings for the Qt application framework from Riverbank Computing. It lets you build native, cross-platform desktop apps in Python using Qt's widgets, layouts and tools.
Almost any desktop software — data dashboards, editors, utilities, media players and scientific tools. If it runs on the desktop, PyQt can build it.
Yes. PyQt is free under the GPL v3 license. A separate commercial license from Riverbank is needed only if you want to ship closed-source proprietary software.
No. PyQt Hub is a community-run guide and is not affiliated with PyQt, Riverbank Computing or any third party.
Download & Installation
The easiest way is pip — run pip install PyQt6. You can also download the documentation pack as a ZIP from our download section.
Open a terminal and run pip install PyQt6. It installs PyQt6 with the matching Qt libraries, so you can start coding right away.
Just Python 3.10 or newer and an up-to-date pip. The Qt libraries come bundled in the wheel, so no separate Qt install is needed.
Yes. PyQt6 provides prebuilt wheels for Windows, macOS and Linux, so the same command works on all three.
Compatibility & Versions
PyQt6 v6.11 requires Python 3.10 or newer. Older releases supported Python 3.9, and PyQt5 still runs on older versions for legacy support.
Both wrap the same Qt with near-identical APIs. PyQt is GPL or commercial (Riverbank); PySide6 is the official binding from The Qt Company under the more permissive LGPL.
Use PyQt6 for new projects — it targets current Qt 6. Choose PyQt5 only to maintain older code or to support Python below 3.10.
Yes. PyQt is fully cross-platform and draws native-looking widgets on each operating system from a single codebase.
Safety & Learning
Yes, when you install it from trusted sources such as PyPI (pip) or the official Riverbank site. Avoid random mirrors and check the package name is exactly PyQt6.
Qt Designer is a drag-and-drop tool for building UIs visually. You lay out widgets, save a .ui file, then load it in Python or convert it with pyuic6.
W3Schools has no dedicated PyQt course. Use the official Riverbank docs and focused tutorials — like the step-by-step guides on this site.
Yes. Our Guides section has a full beginner tutorial plus a complete example app, signals and slots, layouts and more.