Install PySide2 on Windows

Install PySide2 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 PySide2 on your system. If you don't have PySide2 set up yet, the following section will guide you through how to install PySide2 on Windows step by step.

This guide is also available for macOS and Linux.

Install PySide2 on Windows Using pip

PySide2 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 PySide2 from Python 3 simply run the following command in your terminal --

sh
pip3 install pyside2

After the installation is finished, you should be able to run python and import PySide2.

Verify Your PySide2 Installation

To confirm that PySide2 has been installed correctly, open a terminal and start the Python interpreter. Then run the following commands:

python
import PySide2
print(PySide2.__version__)

If you see a version number printed (e.g. 5.15.2), PySide2 is installed and working correctly on your Windows system.

Access Qt Designer and Qt Creator

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

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

Create GUI Applications with Python & Qt6 by Martin Fitzpatrick

(PySide6 Edition) The hands-on guide to making apps with Python — Over 15,000 copies sold!

More info Get the book

Martin Fitzpatrick

Install PySide2 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.