How to get the proper version?

Phil Thompson phil at riverbankcomputing.com
Thu Mar 4 09:18:47 GMT 2021


On 03/03/2021 14:55, ullix wrote:
> After my trouble installing PyQt5-5.15.3 I decided to log all package
> version numbers.
> 
> Pip tells me I have these:
> 
>    PyQt5              5.15.3
>    PyQt5-Qt         5.15.2
>    PyQt5-sip        12.8.1
> 
> But trying this in Python with the variable names in the middle
> column, I get:
> 
> PyQt:         PYQT_VERSION_STR   -->  5.15.3
> PyQt-Qt:    QT_VERSION_STR       -->  5.15.2
> PyQt-sip:    SIP_VERSION_STR      -->  5.4.0
> 
> This is obtained following Pythons official guidance:
> 
> https://wiki.python.org/moin/PyQt/Getting%20the%20version%20numbers%20of%20Qt%2C%20SIP%20and%20PyQt

That's not "official", this is...

https://www.riverbankcomputing.com/static/Docs/PyQt5/api/sip/sip-module.html#SIP_VERSION

> But the sip version is obviously wrong. What kind of sip did I
> actually get, and how do I get the correct one?

You are confusing the SIP code generator (SIP_VERSION_STR: v5.4.0) and 
PyQt5's sip module (v12.8.1). The module's version number corresponds to 
the ABI that it implements. At the moment this isn't available from 
Python.

Phil


More information about the PyQt mailing list