<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body>
<p>I just saw that "As of Python 3.8, this functionality has been
added to the
<a
href="https://docs.python.org/3/library/importlib.metadata.html"
rel="nofollow">Python standard library</a>." as stated here:<br>
<a class="moz-txt-link-freetext" href="https://pypi.org/project/importlib-metadata/">https://pypi.org/project/importlib-metadata/</a></p>
<p>That is a lot more reasonable, although in Py3.9.2 there is still
a warning "This functionality is provisional..."</p>
<p>ullix</p>
<p><br>
</p>
<div class="moz-cite-prefix">Am 04.03.21 um 13:33 schrieb ullix:<br>
</div>
<blockquote type="cite"
cite="mid:99bacd58-2cbd-d21f-6391-131a9863a3c0@urkam.de">Thanks.
And yes, I now get both versions. However, at the expense of
having to do yet another import.
<br>
<br>
<br>
Am 04.03.21 um 11:08 schrieb Florian Bruhin:
<br>
<blockquote type="cite">On Thu, Mar 04, 2021 at 09:18:47AM +0000,
Phil Thompson wrote:
<br>
<blockquote type="cite">On 03/03/2021 14:55, ullix wrote:
<br>
<blockquote type="cite">After my trouble installing
PyQt5-5.15.3 I decided to log all package
<br>
version numbers.
<br>
<br>
Pip tells me I have these:
<br>
<br>
PyQt5 5.15.3
<br>
PyQt5-Qt 5.15.2
<br>
PyQt5-sip 12.8.1
<br>
<br>
But trying this in Python with the variable names in the
middle
<br>
column, I get:
<br>
<br>
PyQt: PYQT_VERSION_STR --> 5.15.3
<br>
PyQt-Qt: QT_VERSION_STR --> 5.15.2
<br>
PyQt-sip: SIP_VERSION_STR --> 5.4.0
<br>
<br>
This is obtained following Pythons official guidance:
<br>
<br>
<a class="moz-txt-link-freetext" href="https://wiki.python.org/moin/PyQt/Getting%20the%20version%20numbers%20of%20Qt%2C%20SIP%20and%20PyQt">https://wiki.python.org/moin/PyQt/Getting%20the%20version%20numbers%20of%20Qt%2C%20SIP%20and%20PyQt</a>
<br>
</blockquote>
That's not "official", this is...
<br>
<br>
<a class="moz-txt-link-freetext" href="https://www.riverbankcomputing.com/static/Docs/PyQt5/api/sip/sip-module.html#SIP_VERSION">https://www.riverbankcomputing.com/static/Docs/PyQt5/api/sip/sip-module.html#SIP_VERSION</a>
<br>
<br>
<blockquote type="cite">But the sip version is obviously
wrong. What kind of sip did I
<br>
actually get, and how do I get the correct one?
<br>
</blockquote>
You are confusing the SIP code generator (SIP_VERSION_STR:
v5.4.0) and
<br>
PyQt5's sip module (v12.8.1). The module's version number
corresponds to the
<br>
ABI that it implements. At the moment this isn't available
from Python.
<br>
<br>
Phil
<br>
</blockquote>
Note you can ask importlib_metadata about the package version:
<br>
<br>
>>> import importlib_metadata
<br>
>>> importlib_metadata.version('PyQt5-sip')
<br>
'12.8.1'
<br>
<br>
Florian
<br>
<br>
</blockquote>
</blockquote>
</body>
</html>