PyQt5 Tools
raw JSON → 5.15.9.3.3 verified Mon Apr 27 auth: no python
PyQt5-tools provides Qt Designer, Qt Linguist, and other Qt tools for PyQt5 development. Current version 5.15.9.3.3, with irregular releases. It bundles binaries for Windows and Linux to avoid manual installation of Qt tools.
pip install pyqt5-tools Common errors
error ModuleNotFoundError: No module named 'pyqt5_tools' ↓
cause Package not installed or old version with different namespace.
fix
Run
pip install pyqt5-tools and use correct import: from pyqt5_tools import QtDesigner error 'QtDesigner' object has no attribute 'run' ↓
cause Using older version where the API was different or import was incorrect.
fix
Update pyqt5-tools:
pip install --upgrade pyqt5-tools and use QtDesigner.run() Warnings
breaking In version 5.15.x, the import path changed from `pyqt5_tools.designer` to `pyqt5_tools.QtDesigner.run()`. Direct function calls break. ↓
fix Use `from pyqt5_tools import QtDesigner; QtDesigner.run()`
gotcha PyQt5-tools does not install PyQt5 automatically. Must install PyQt5 separately. ↓
fix Run `pip install PyQt5` before or alongside pyqt5-tools.
gotcha On Linux, Qt platform plugin errors may occur: 'Could not load the Qt platform plugin "xcb"'. This is due to missing system libraries. ↓
fix Install system packages: `sudo apt install libxcb-xinerama0` or use offscreen platform: `export QT_QPA_PLATFORM=offscreen`
Imports
- QtDesigner launch wrong
import pyqt5_tools; pyqt5_tools.designer()correctfrom pyqt5_tools import QtDesigner; QtDesigner.run()
Quickstart
import os
from pyqt5_tools import QtDesigner
# Optionally set designer path
os.environ.setdefault('QT_QPA_PLATFORM_PLUGIN_PATH', '')
QtDesigner.run()