Getting the version numbers of Qt, SIP and PyQt
When you report a bug in PyQt you need to supply information about the configuration you are using, including the versions of the Qt library, SIP and PyQt modules. The following code should help.
Note that the pyqtconfig module is deprecated in PyQt 4.10. See http://pyqt.sourceforge.net/Docs/PyQt4/build_system.html for more details. If you are unable to import pyqtconfig (for example when using Riverbank's packaged binaries) you can use the following:
For PyQt5 getting the version is the same as in the last example above, just exchange PyQt4 for PyQt5