Importing PyQt5* fails on Mac

ullix ullix at urkam.de
Tue Oct 31 08:05:16 GMT 2023


This one-liner fails on Mac (macbook air M1, OS Big Sur 11.6):

    fromPyQt5.QtWidgetsimport*

with this output on Py3.10 and same on Py3.11:

    python3.10 test4mac.py Exception:
    dlopen(/opt/homebrew/lib/python3.10/site-packages/PyQt5/QtWidgets.abi3.so,
    2): Symbol not found: __ZTVNSt3__13pmr25monotonic_buffer_resourceE
    Referenced from:
    /opt/homebrew/lib/python3.10/site-packages/PyQt5/Qt5/lib/QtCore.framework/Versions/5/QtCore
    Expected in: /usr/lib/libc++.1.dylib in
    /opt/homebrew/lib/python3.10/site-packages/PyQt5/Qt5/lib/QtCore.framework/Versions/5/QtCore
    python3.11 test4mac.py Exception:
    dlopen(/Users/alkaddy/Library/Python/3.11/lib/python/site-packages/PyQt5/QtWidgets.abi3.so,
    2): Symbol not found: __ZTVNSt3__13pmr25monotonic_buffer_resourceE
    Referenced from:
    /Users/alkady/Library/Python/3.11/lib/python/site-packages/PyQt5/Qt5/lib/QtCore.framework/Versions/5/QtCore
    Expected in: /usr/lib/libc++.1.dylib in
    /Users/alesandro/Library/Python/3.11/lib/python/site-packages/PyQt5/Qt5/lib/QtCore.framework/Versions/5/QtCore


The tiny test program is attached.
The PyQt stuff had been installed with:

    |python3 -m pip uninstall PyQt5 PyQt5-sip|

Any guidance? Thanks.
ullix
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20231031/a9375af6/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test4mac.py
Type: text/x-python
Size: 273 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20231031/a9375af6/attachment.py>


More information about the PyQt mailing list