Importing PyQt5* fails on Mac

Grzegorz Bokota g.bokota at mimuw.edu.pl
Thu Nov 2 18:34:46 GMT 2023


Dear Phil,
I just tested PyQt5 wheels on macos 13.2.1 and got:

In [2]: from PyQt5.QtWidgets import QApplication, QLabel
   ...:
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
Cell In[2], line 1
----> 1 from PyQt5.QtWidgets import QApplication, QLabel

ImportError:
dlopen(/Users/sobolp/micromamba/envs/napari-419/lib/python3.11/site-packages/PyQt5/
QtWidgets.abi3.so, 0x0002): Symbol not found:
__ZTVNSt3__13pmr25monotonic_buffer_resourceE
  Referenced from: <8239A761-D3BE-396C-A445-F703655273B5>
/Users/sobolp/micromamba/envs/napari-419/lib/python3.11/site-packages/PyQt5/Qt5/lib/QtWidgets.framework/Versions/5/QtWidgets
  Expected in:     <3EE92404-8FC3-374B-A598-D5C9A8CD64B5>
/usr/lib/libc++.1.dylib

The wheels are tagged as 11.0 compatible. Also, wheels on from riverbank
pypi (https://www.riverbankcomputing.com/pypi/) are working without any
problem on this machine. could you chek what may have men changed and
rebuilt the wheels?

Regards,
Grzegorz Bokota




wt., 31 paź 2023 o 11:41 Phil Thompson <phil at riverbankcomputing.com>
napisał(a):

> On 31/10/2023 08:05, ullix wrote:
> > 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
>
> It's possibly an issue with your version of macOS. The Qt wheels are
> built with Xcode 15 on Ventura.
>
> Phil
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20231102/dcfa69a6/attachment.htm>


More information about the PyQt mailing list