{"id":2705,"library":"pyqt5-qt5","title":"PyQt5 Qt5 Runtime Libraries","description":"The `pyqt5-qt5` package bundles a critical subset of the Qt installation required by PyQt5, enabling PyQt5 applications to run without a separate, system-wide Qt installation. It functions primarily as an internal dependency and is typically installed automatically by `pip` when the `PyQt5` package is installed. This package is licensed under the LGPL v3. As of its latest release, the current version is 5.15.18.","status":"active","version":"5.15.18","language":"en","source_language":"en","source_url":"https://www.riverbankcomputing.com/software/pyqt/","tags":["GUI","Qt","toolkit","dependency","runtime"],"install":[{"cmd":"pip install pyqt5-qt5","lang":"bash","label":"Primary Installation (usually implicit via PyQt5)"},{"cmd":"pip install PyQt5","lang":"bash","label":"Recommended (installs pyqt5-qt5 automatically)"}],"dependencies":[],"imports":[],"quickstart":{"code":"import sys\nfrom PyQt5.QtWidgets import QApplication, QWidget, QLabel\nfrom PyQt5.QtGui import QIcon\n\nif __name__ == '__main__':\n    app = QApplication(sys.argv)\n    \n    window = QWidget()\n    window.setWindowTitle('PyQt5 Hello World')\n    window.setGeometry(100, 100, 400, 200)\n\n    label = QLabel('Hello from PyQt5!', window)\n    label.move(150, 80)\n    \n    window.show()\n    sys.exit(app.exec_())\n","lang":"python","description":"The `pyqt5-qt5` package is not directly imported or used by end-user code. Instead, it provides the underlying Qt binaries for `PyQt5`. The quickstart below demonstrates a basic 'Hello World' application using `PyQt5`, which relies on `pyqt5-qt5` for its runtime environment."},"warnings":[{"fix":"Do not import `pyqt5-qt5` directly. All user-facing code should import from `PyQt5` (e.g., `from PyQt5.QtWidgets import QApplication`).","message":"`pyqt5-qt5` is an internal dependency containing Qt binaries, not Python modules for direct user import. Attempting to `import pyqt5_qt5` will result in an `ImportError` or unexpected behavior.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Always install `PyQt5` as the primary package; let `pip` manage `pyqt5-qt5` as its dependency.","message":"It is highly recommended to install `PyQt5` directly (e.g., `pip install PyQt5`). This will automatically pull in the compatible version of `pyqt5-qt5`. Manually installing `pyqt5-qt5` or installing an incompatible version can lead to runtime errors or crashes.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Be aware of the package size during installation. Consider using virtual environments to isolate dependencies.","message":"The `pyqt5-qt5` package contains the bundled Qt libraries, making its installation size significant (tens of megabytes to over a hundred, depending on platform and version). This is expected but can impact CI/CD pipelines or environments with limited disk space.","severity":"gotcha","affected_versions":"All versions"},{"fix":"For new development, evaluate `PyQt6`. If migrating from `PyQt5` to `PyQt6`, refer to migration guides for syntax adjustments.","message":"`PyQt5` (and thus `pyqt5-qt5`) is based on Qt 5. For new projects or to leverage the latest Qt features, consider using `PyQt6` (which uses Qt 6 and has its own `pyqt6-qt6` dependency). While much of the `PyQt5` API is similar to `PyQt6`, there are some notable changes in `PyQt6` (e.g., fully qualified enums, `exec()` instead of `exec_()`).","severity":"deprecated","affected_versions":"All PyQt5 versions (in context of Qt evolution)"}],"env_vars":null,"last_verified":"2026-04-10T00:00:00.000Z","next_check":"2026-07-09T00:00:00.000Z"}