[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: Importing PyQt5* fails on Mac
From:       Grzegorz Bokota <g.bokota () mimuw ! edu ! pl>
Date:       2023-11-07 14:55:58
Message-ID: CAKFG=VCzPQZq8k3FVg8m9hLczZqkvxKPA6s8dtV1snqV9RsRaA () mail ! gmail ! com
[Download RAW message or body]

I installed it on my Mac, and import works. I will test more.

I have started from these two links: I cannot find now where I sound to
suggest that it is connected with c++17.

https://forum.qt.io/topic/149842/qt-6-5-2-build-crash-after-update-to-macos=
14-sdk
https://bugreports.qt.io/browse/QTBUG-117484

wt., 7 lis 2023 o 10:23 Phil Thompson <phil@riverbankcomputing.com>
napisa=C5=82(a):

> Did you mean Xcode 15 and not 14?
>
> Can you point me to the links you found describing the problem.
>
> I've re-built the PyQt5-Qt5 wheel using Xcode 14.3.1 and put it up on
> the local PyPI server. I think it fixes the problem so please test.
>
> Thanks,
> Phil
>
> On 02/11/2023 19:16, Grzegorz Bokota wrote:
> > Googling provides information that when code is build using XCode 14
> > with
> > c++17 mode, it will not work with macOS Ventura arm64 (lack of symbols
> > in
> > libc++) . Did PyQt5 require  c++17, or could it be compiled with an
> > older
> > version?
> >
> > Regards,
> > Grzegorz Bokota
> >
> > czw., 2 lis 2023 o 19:34 Grzegorz Bokota <g.bokota@mimuw.edu.pl>
> > napisa=C5=82(a):
> >
> >> 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-packa=
ges/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/PyQ=
t5/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=C5=BA 2023 o 11:41 Phil Thompson <phil@riverbankcomputing.c=
om>
> >> napisa=C5=82(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_resourc=
eE
> >>> >    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_resourc=
eE
> >>> >    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/l=
ib/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
> >>>
> >>
>

[Attachment #3 (text/html)]

<div dir="ltr"><div>I installed it on my Mac, and import works. I will test more. \
<br></div><div><br></div><div>I have started from these two links: I cannot find now \
where I sound to suggest that it is connected with c++17. \
<br></div><div><br></div><div><a \
href="https://forum.qt.io/topic/149842/qt-6-5-2-build-crash-after-update-to-macos14-sd \
k">https://forum.qt.io/topic/149842/qt-6-5-2-build-crash-after-update-to-macos14-sdk</a></div><div><a \
href="https://bugreports.qt.io/browse/QTBUG-117484">https://bugreports.qt.io/browse/QTBUG-117484</a></div></div><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">wt., 7 lis 2023 o 10:23  Phil \
Thompson &lt;<a href="mailto:phil@riverbankcomputing.com">phil@riverbankcomputing.com</a>&gt; \
napisał(a):<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Did you mean Xcode 15 \
and not 14?<br> <br>
Can you point me to the links you found describing the problem.<br>
<br>
I&#39;ve re-built the PyQt5-Qt5 wheel using Xcode 14.3.1 and put it up on <br>
the local PyPI server. I think it fixes the problem so please test.<br>
<br>
Thanks,<br>
Phil<br>
<br>
On 02/11/2023 19:16, Grzegorz Bokota wrote:<br>
&gt; Googling provides information that when code is build using XCode 14 <br>
&gt; with<br>
&gt; c++17 mode, it will not work with macOS Ventura arm64 (lack of symbols <br>
&gt; in<br>
&gt; libc++) . Did PyQt5 require   c++17, or could it be compiled with an <br>
&gt; older<br>
&gt; version?<br>
&gt; <br>
&gt; Regards,<br>
&gt; Grzegorz Bokota<br>
&gt; <br>
&gt; czw., 2 lis 2023 o 19:34 Grzegorz Bokota &lt;<a \
href="mailto:g.bokota@mimuw.edu.pl" target="_blank">g.bokota@mimuw.edu.pl</a>&gt; \
<br> &gt; napisał(a):<br>
&gt; <br>
&gt;&gt; Dear Phil,<br>
&gt;&gt; I just tested PyQt5 wheels on macos 13.2.1 and got:<br>
&gt;&gt; <br>
&gt;&gt; In [2]: from PyQt5.QtWidgets import QApplication, QLabel<br>
&gt;&gt;      ...:<br>
&gt;&gt; ---------------------------------------------------------------------------<br>
 &gt;&gt; ImportError                                               Traceback (most \
recent call <br> &gt;&gt; last)<br>
&gt;&gt; Cell In[2], line 1<br>
&gt;&gt; ----&gt; 1 from PyQt5.QtWidgets import QApplication, QLabel<br>
&gt;&gt; <br>
&gt;&gt; ImportError:<br>
&gt;&gt; dlopen(/Users/sobolp/micromamba/envs/napari-419/lib/python3.11/site-packages/PyQt5/<br>
 &gt;&gt; <a href="http://QtWidgets.abi3.so" rel="noreferrer" \
target="_blank">QtWidgets.abi3.so</a>, 0x0002): Symbol not found:<br> &gt;&gt; \
__ZTVNSt3__13pmr25monotonic_buffer_resourceE<br> &gt;&gt;     Referenced from: \
&lt;8239A761-D3BE-396C-A445-F703655273B5&gt;<br> &gt;&gt; \
/Users/sobolp/micromamba/envs/napari-419/lib/python3.11/site-packages/PyQt5/Qt5/lib/QtWidgets.framework/Versions/5/QtWidgets<br>
 &gt;&gt;     Expected in:        &lt;3EE92404-8FC3-374B-A598-D5C9A8CD64B5&gt;<br>
&gt;&gt; /usr/lib/libc++.1.dylib<br>
&gt;&gt; <br>
&gt;&gt; The wheels are tagged as 11.0 compatible. Also, wheels on from <br>
&gt;&gt; riverbank<br>
&gt;&gt; pypi (<a href="https://www.riverbankcomputing.com/pypi/" rel="noreferrer" \
target="_blank">https://www.riverbankcomputing.com/pypi/</a>) are working without \
<br> &gt;&gt; any<br>
&gt;&gt; problem on this machine. could you chek what may have men changed and<br>
&gt;&gt; rebuilt the wheels?<br>
&gt;&gt; <br>
&gt;&gt; Regards,<br>
&gt;&gt; Grzegorz Bokota<br>
&gt;&gt; <br>
&gt;&gt; <br>
&gt;&gt; <br>
&gt;&gt; <br>
&gt;&gt; wt., 31 paź 2023 o 11:41 Phil Thompson &lt;<a \
href="mailto:phil@riverbankcomputing.com" \
target="_blank">phil@riverbankcomputing.com</a>&gt;<br> &gt;&gt; napisał(a):<br>
&gt;&gt; <br>
&gt;&gt;&gt; On 31/10/2023 08:05, ullix wrote:<br>
&gt;&gt;&gt; &gt; This one-liner fails on Mac (macbook air M1, OS Big Sur 11.6):<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;      fromPyQt5.QtWidgetsimport*<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; with this output on Py3.10 and same on Py3.11:<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;      python3.10 test4mac.py Exception:<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; dlopen(/opt/homebrew/lib/python3.10/site-packages/PyQt5/<br>
&gt;&gt;&gt; <a href="http://QtWidgets.abi3.so" rel="noreferrer" \
target="_blank">QtWidgets.abi3.so</a>,<br> &gt;&gt;&gt; &gt;      2): Symbol not \
found: __ZTVNSt3__13pmr25monotonic_buffer_resourceE<br> &gt;&gt;&gt; &gt;      \
Referenced from:<br> &gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; /opt/homebrew/lib/python3.10/site-packages/PyQt5/Qt5/lib/QtCore.framework/Versions/5/QtCore<br>
 &gt;&gt;&gt; &gt;      Expected in: /usr/lib/libc++.1.dylib in<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; /opt/homebrew/lib/python3.10/site-packages/PyQt5/Qt5/lib/QtCore.framework/Versions/5/QtCore<br>
 &gt;&gt;&gt; &gt;      python3.11 test4mac.py Exception:<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; dlopen(/Users/alkaddy/Library/Python/3.11/lib/python/site-packages/PyQt5/<br>
 &gt;&gt;&gt; <a href="http://QtWidgets.abi3.so" rel="noreferrer" \
target="_blank">QtWidgets.abi3.so</a>,<br> &gt;&gt;&gt; &gt;      2): Symbol not \
found: __ZTVNSt3__13pmr25monotonic_buffer_resourceE<br> &gt;&gt;&gt; &gt;      \
Referenced from:<br> &gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; /Users/alkady/Library/Python/3.11/lib/python/site-packages/PyQt5/Qt5/lib/QtCore.framework/Versions/5/QtCore<br>
 &gt;&gt;&gt; &gt;      Expected in: /usr/lib/libc++.1.dylib in<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; /Users/alesandro/Library/Python/3.11/lib/python/site-packages/PyQt5/Qt5/lib/QtCore.framework/Versions/5/QtCore<br>
 &gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; The tiny test program is attached.<br>
&gt;&gt;&gt; &gt; The PyQt stuff had been installed with:<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;      |python3 -m pip uninstall PyQt5 PyQt5-sip|<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; Any guidance? Thanks.<br>
&gt;&gt;&gt; &gt; ullix<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; It&#39;s possibly an issue with your version of macOS. The Qt wheels \
are<br> &gt;&gt;&gt; built with Xcode 15 on Ventura.<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; Phil<br>
&gt;&gt;&gt; <br>
&gt;&gt; <br>
</blockquote></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic