{"id":22360,"library":"shiboken2","title":"Shiboken2","description":"Shiboken2 is the Python binding generator and helper module for PySide2 (Qt for Python, Qt5). This package provides the `shiboken2` runtime module used by PySide2 to manage C++ object ownership and lifetime. Current version: 5.15.2.1 (final PySide2 release). Maintenance-only status; no new releases expected as the project focuses on PySide6.","status":"maintenance","version":"5.15.2.1","language":"python","source_language":"en","source_url":"https://github.com/qtproject/pyside-pyside2/tree/5.15/sources/shiboken2","tags":["pyside2","qt5","binding","cpp","shiboken"],"install":[{"cmd":"pip install shiboken2","lang":"bash","label":"PyPI install"}],"dependencies":[{"reason":"Shiboken2 is the runtime dependency for PySide2; they must be version-matched.","package":"PySide2","optional":false}],"imports":[{"note":"The module is named 'shiboken2' on PyPI, but the import package is 'shiboken2'. Use the correct import to avoid ModuleNotFoundError.","wrong":"import shiboken","symbol":"Shiboken","correct":"from shiboken2 import Shiboken"},{"note":"Shiboken functions are not part of PySide2's public API; import explicitly from shiboken2.","wrong":"from PySide2 import getCppPointer","symbol":"getCppPointer","correct":"from shiboken2 import getCppPointer"}],"quickstart":{"code":"from shiboken2 import Shiboken\nfrom PySide2.QtWidgets import QWidget\n\nwidget = QWidget()\nprint(Shiboken.getCppPointer(widget))","lang":"python","description":"Basic usage: import the Shiboken helper and get the C++ pointer of a Qt object."},"warnings":[{"fix":"Upgrade to PySide6 / shiboken6 for Python 3.11+ support.","message":"shiboken2 5.15.2.1 is the final release for Python 3.10 support. Python 3.11 and above are not supported.","severity":"breaking","affected_versions":">=5.15.2.1"},{"fix":"Migrate to PySide6 and use shiboken6 for new projects.","message":"shiboken2 is deprecated in favor of shiboken6. No new features or bug fixes will be released.","severity":"deprecated","affected_versions":"all"},{"fix":"Install PySide2 (e.g., pip install PySide2) which pulls in the correct shiboken2 version.","message":"shiboken2 cannot be imported directly without PySide2 installed; it is a runtime dependency of PySide2 and lacks standalone wheels.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Install PySide2: pip install PySide2","cause":"shiboken2 is not installed or PySide2 is missing.","error":"ModuleNotFoundError: No module named 'shiboken2'"},{"fix":"Use: from shiboken2 import getCppPointer","cause":"Trying to import shiboken functions from the wrong package.","error":"ImportError: cannot import name 'getCppPointer' from 'PySide2'"},{"fix":"Always import shiboken2 after PySide2 (or any Qt module) has been imported in your application.","cause":"shiboken2 module imported before PySide2 initialises Qt.","error":"RuntimeError: shiboken2. Shiboken needs to be imported after PySide2"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}