How to Get the PySide6 Version Number?

Find out which version of PySide6 you're running
Heads up! You've already completed this tutorial.

Sometimes you need to know which version of PySide6 you have installed. Below are two ways to check the PySide6 version on your system — first using the pip command from the terminal and second programmatically from within your Python code.

Check PySide6 Version From the Command Line

If you just want to know which version of PySide6 is installed, and you installed the package using pip, you can use the following command to return the current version:

sh
$ pip show pyside6
Name: PySide6
Version: 6.9.0
Summary: Python bindings for the Qt cross-platform application and UI framework
Home-page: https://pyside.org
Author:
Author-email: Qt for Python Team <pyside@qt-project.org>
License: LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
Location: .../lib/python3.13/site-packages
Requires: PySide6-Addons, PySide6-Essentials, shiboken6
Required-by:

The second line of this output shows the PySide6 version number you're using in your current Python environment. In this particular example, we're using PySide6 version 6.9.0.

If you haven't installed PySide6 yet, see our guide on how to install PySide6 on Windows, Linux, or macOS.

Get PySide6 Version Programmatically in Python

Sometimes, you need to check the PySide6 version from within your code. Perhaps you're a library developer, and your code uses certain features of PySide6 that are only available in specific versions, and you want to disable these in earlier versions.

In that case, you can use the following Python code to get the PySide6 version number and the underlying Qt version:

python
>>> import PySide6
>>> import PySide6.QtCore
>>> print(
    "Qt: v", PySide6.QtCore.__version__,
     "\tPySide6: v", PySide6.__version__
)
Qt: v 6.9.0     PySide6: v 6.9.0

This also gives you the version of Qt. On my machine, I'm running version 6.9.0 of both Qt and PySide6.

Summary

To quickly check your PySide6 version, use pip show pyside6 from the command line. If you need to check the version programmatically within a Python script, access PySide6.__version__ for the PySide6 version or PySide6.QtCore.__version__ for the underlying Qt version. Both approaches work on Windows, macOS, and Linux wherever PySide6 is installed.

Once you've confirmed your version, you're ready to start building — check out our tutorial on creating your first PySide6 window to get going.

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

Packaging Python Applications with PyInstaller by Martin Fitzpatrick

This step-by-step guide walks you through packaging your own Python applications from simple examples to complete installers and signed executables.

More info Get the book

Martin Fitzpatrick

How to Get the PySide6 Version Number? was written by Martin Fitzpatrick with contributions from Leo Well.

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.