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 of getting this information from your system -- first using the pip command and second, from PySide6 itself.

Finding the Version From the Command Line

If you just want to know which version is installed for yourself, 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 on 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.

Finding the Version Within Your Code

Sometimes, you need to know the version 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 code to get the version number.

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

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

Over 15,000 developers have bought Create GUI Applications with Python & Qt!
Create GUI Applications with Python & Qt6
Take a look

Downloadable ebook (PDF, ePub) & Complete Source code

Also available from Leanpub and Amazon Paperback

[[ discount.discount_pc ]]% OFF for the next [[ discount.duration ]] [[discount.description ]] with the code [[ discount.coupon_code ]]

Purchasing Power Parity

Developers in [[ country ]] get [[ discount.discount_pc ]]% OFF on all books & courses with code [[ discount.coupon_code ]]
Well done, you've finished this tutorial! Mark As Complete
[[ user.completed.length ]] completed [[ user.streak+1 ]] day streak
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.