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 --
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:
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.
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!