Install PyQt5 on Windows
Install PyQt5 on Windows 9 & 10

Before you start the PyQt tutorial you will need to have a working installation of PyQt5 or 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 Windows.

This guide is also available for macOS and Linux.

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 Windows

PyQt5 for Windows can be installed as for any other application or library. As of Qt 5.6 installers are available to install via PyPi, the Python Package archive. To install PyQt5 from Python3 simply run --

bash
pip3 install pyqt5

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

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 PyQt.

If you want access to Qt Designer or Qt Creator you will need to download this from the Qt downloads site.

Install PyQt6 on Windows

PyQt6 for Windows can be installed as for any other application or library. Installers are available to install via PyPi, the Python Package archive. To install PyQt6 from Python3 simply run --

bash
pip3 install pyqt6

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

python
Python 3.7.6 (tags/v3.7.6:43364a7ae0, Dec 19 2019, 00:42:30) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import PyQt6
>>>

You can now start creating Python GUI applications with PyQt.

If you want access to Qt Designer or Qt Creator you will need to download this from the Qt downloads site.

Continue reading