Install PyQt5 on Windows

Install PyQt5 on Windows 8, 10 & 11
Heads up! You've already completed this tutorial.

Before you start coding you will first need to have a working installation of PyQt5 on your system. If you don't have PyQt5 set up yet, the following section will guide you through how to install PyQt5 on Windows step by step.

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 Using pip

PyQt5 for Windows can be installed as for any other application or library. Since Qt 5.6, PyQt5 packages are available on PyPI (the Python Package Index), making installation straightforward with pip.

Prerequisites for Installing PyQt5

Before installing PyQt5, make sure you have the following:

  • Python 3 installed on your Windows system. You can download the latest version from the official Python website.
  • pip — Python's package manager, which is included by default with Python 3.4 and later.

To verify that Python and pip are available, open a command prompt and run:

bash
python --version
pip --version

If both commands return a version number, you're ready to proceed with the PyQt5 installation.

Install PyQt5 with pip

To install PyQt5 from Python 3, open a command prompt and simply run:

bash
pip3 install pyqt5

Pip will download and install PyQt5 along with its dependencies. This may take a minute depending on your internet connection.

Verify the PyQt5 Installation

After the install is finished, you can verify that PyQt5 is correctly installed by opening a Python shell and importing the package:

python
import PyQt5

If no errors appear, PyQt5 has been successfully installed and you're ready to start building Python GUI applications on Windows.

Troubleshooting Common PyQt5 Installation Issues

If you run into problems installing PyQt5 on Windows, try the following:

  • pip is not recognized: Make sure Python is added to your system PATH. You can re-run the Python installer and check the "Add Python to PATH" option.
  • Permission errors: Try running the command prompt as Administrator, or use pip3 install --user pyqt5 to install for the current user only.
  • Outdated pip: Update pip before installing PyQt5 by running python -m pip install --upgrade pip.

What's Next?

With PyQt5 installed on your Windows machine, you can begin creating cross-platform desktop applications with Python. Check out our PyQt5 tutorials to start building your first GUI app.

Note that if you want access to Qt Designer or Qt Creator you will need to download this from https://qt.io/download[the Qt downloads site].

Well done, you've finished this tutorial! Mark As Complete
[[ user.completed.length ]] completed [[ user.streak+1 ]] day streak

Bring Your PyQt/PySide Application to Market

Stuck in development hell? I'll help you get your project focused, finished and released. Benefit from years of practical experience releasing software with Python.

Find out More

Martin Fitzpatrick

Install PyQt5 on Windows was written by Martin Fitzpatrick.

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. Martin founded PythonGUIs to provide easy to follow GUI programming tutorials to the Python community. He has written a number of popular Python books on the subject.