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

List:       pykde
Subject:    Re: Can't import default pyqt6 wheels on windows
From:       Charles <peacech () gmail ! com>
Date:       2023-12-15 11:27:56
Message-ID: CABthHP-G-WL3xMW5pFnxsGX7-MR96u42KOjTZ8O-0a9MOZem3w () mail ! gmail ! com
[Download RAW message or body]

Sorry, my mistake, I seem to have the wrong Qt6Charts.dll. I reinstalled
the dlls and can import it without problems.

Python 3.11.6 (tags/v3.11.6:8b6ee5b, Oct  2 2023, 14:57:12) [MSC v.1935 64
bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
> > > from PyQt6.QtCharts import *
> > > 

You might have mixed Qt installation. Try to reinstall all the dependencies
since
Qt 6.6.0 and 6.6.1 dlls are not compatible not just on linux but also even
on Windows

pip install PyQt6==6.6.1 PyQt6-Qt6==6.6.1 PyQt6-Charts==6.6.1
PyQt6-Charts-Qt6==6.6.1

On Fri, Dec 15, 2023 at 6:18 PM Charles <peacech@gmail.com> wrote:

> I also notice that Qt6Charts.dll imports libc++.dll, so this seems to be
> the one that is compiled with mingw instead of msvc.
> 
> On Fri, Dec 15, 2023 at 5:44 PM Charles <peacech@gmail.com> wrote:
> 
> > At least with PyQt6/PyQt6-Qt6/PyQt6-QtCharts/PyQt6-QtCharts-Qt version
> > 6.6.0, Qt6Charts.dll exports and imports using C calling convention
> > (__cdecl) instead of C++ convention, causing the error above.
> > 
> > This is visible from this sample of exported names, which start with
> > underscore:
> > 
> > 2617 (0x0a39),  (0x), _ZN25QCandlestickSeriesPrivate16staticMetaObjectE,
> > 0x0011e3b0, Demumble
> > 2618 (0x0a3a),  (0x),
> > _ZN25QCandlestickSeriesPrivate18handleSeriesChangeEP15QAbstractSeries,
> > 0x000df070, Demumble
> > 2619 (0x0a3b),  (0x),
> > _ZN25QCandlestickSeriesPrivate18handleSeriesRemoveEP15QAbstractSeries,
> > 0x000df090, Demumble
> > 2620 (0x0a3c),  (0x),
> > _ZN25QCandlestickSeriesPrivate18initializeGraphicsEP13QGraphicsItem,
> > 0x000ded80, Demumble
> > 2621 (0x0a3d),  (0x),
> > _ZN25QCandlestickSeriesPrivate18qt_static_metacallEP7QObjectN11QMetaObject4CallEiPPv,
> >  0x000df9c0, Demumble
> > 2622 (0x0a3e),  (0x),
> > _ZN25QCandlestickSeriesPrivate19createLegendMarkersEP7QLegend, 0x000def10,
> > Demumble
> > 2623 (0x0a3f),  (0x),
> > _ZN25QCandlestickSeriesPrivate19updatedCandlesticksEv, 0x000dfe60, Demumble
> > 2624 (0x0a40),  (0x),
> > _ZN25QCandlestickSeriesPrivate20initializeAnimationsE6QFlagsIN6QChart15AnimationOptionEEiR12QEasingCurve,
> >  0x000dee70, Demumble
> > 
> > You might try replacing Qt6Charts.dll with the one from PySide6.
> > 
> > On Fri, Dec 15, 2023 at 4:57 PM Patrick Stinson <patrickkidd@gmail.com>
> > wrote:
> > 
> > > I might add that this was done in a virtual environment created by
> > > pipenv. Looks like it works when using the system installed python.
> > > 
> > > > On Dec 14, 2023, at 5:41 PM, Patrick Stinson <patrickkidd@gmail.com>
> > > wrote:
> > > > 
> > > > I get a DLL linking error with a clean python 3.9.13 install and "pip
> > > install pyqt6" on windows. This occurs on every machine I try it on in our
> > > lab, whether windows 10 or windows 11. Installing "pyqt6-tools" gets me
> > > going for just pyqt6. I am doing a lot of pretty basic stuff so I am not
> > > tied to a particular pyqt6 or Qt6 version.
> > > > 
> > > > Now I want to use pyqt6-charts and I am getting the DLL error again:
> > > "DLL load failed while importing QtCharts: the specified procedure can't be
> > > found."
> > > > 
> > > > Are the pyqt6 wheels all really broken? Is it my python version? The
> > > wheels do include the qt binaries so what is going on? This problem is
> > > easily reproducible so I thought there might be a straightforward answer
> > > here.
> > > > 
> > > > Cheers
> > > > -Patrick
> > > 
> > 


[Attachment #3 (text/html)]

<div dir="ltr"><div class="gmail_default" \
style="font-family:arial,helvetica,sans-serif;font-size:small">Sorry, my mistake, I \
seem to have the wrong Qt6Charts.dll. I reinstalled the dlls and can import it \
without problems.</div><div class="gmail_default" \
style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div \
class="gmail_default" \
style="font-family:arial,helvetica,sans-serif;font-size:small">Python 3.11.6 \
(tags/v3.11.6:8b6ee5b, Oct   2 2023, 14:57:12) [MSC v.1935 64 bit (AMD64)] on \
win32<br>Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or \
&quot;license&quot; for more information.<br>&gt;&gt;&gt; from PyQt6.QtCharts import \
*<br>&gt;&gt;&gt;</div><div class="gmail_default" \
style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div \
class="gmail_default" \
style="font-family:arial,helvetica,sans-serif;font-size:small">You might have mixed \
Qt installation. Try to reinstall all the dependencies since  </div><div \
class="gmail_default" \
style="font-family:arial,helvetica,sans-serif;font-size:small">Qt 6.6.0 and 6.6.1 \
dlls are not compatible not just on linux but also even on Windows<br></div><div \
class="gmail_default" \
style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div \
class="gmail_default" \
style="font-family:arial,helvetica,sans-serif;font-size:small">pip install \
PyQt6==6.6.1 PyQt6-Qt6==6.6.1 PyQt6-Charts==6.6.1 \
PyQt6-Charts-Qt6==6.6.1<br></div></div><br><div class="gmail_quote"><div dir="ltr" \
class="gmail_attr">On Fri, Dec 15, 2023 at 6:18 PM Charles &lt;<a \
href="mailto:peacech@gmail.com">peacech@gmail.com</a>&gt; wrote:<br></div><blockquote \
class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_default" \
style="font-family:arial,helvetica,sans-serif;font-size:small">I also notice that \
Qt6Charts.dll imports libc++.dll, so this seems to be the one that is compiled with \
mingw instead of msvc.<br></div></div><br><div class="gmail_quote"><div dir="ltr" \
class="gmail_attr">On Fri, Dec 15, 2023 at 5:44 PM Charles &lt;<a \
href="mailto:peacech@gmail.com" target="_blank">peacech@gmail.com</a>&gt; \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div \
class="gmail_default" \
style="font-family:arial,helvetica,sans-serif;font-size:small">At least with \
PyQt6/PyQt6-Qt6/PyQt6-QtCharts/PyQt6-QtCharts-Qt version 6.6.0, Qt6Charts.dll exports \
and imports using C calling convention (__cdecl) instead of C++ convention, causing \
the error above.</div><div class="gmail_default" \
style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div \
class="gmail_default" \
style="font-family:arial,helvetica,sans-serif;font-size:small">This is visible from \
this sample of exported names, which start with underscore:<br></div><div \
class="gmail_default" \
style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div \
class="gmail_default" \
style="font-family:arial,helvetica,sans-serif;font-size:small">2617 (0x0a39),   (0x), \
_ZN25QCandlestickSeriesPrivate16staticMetaObjectE, 0x0011e3b0, Demumble<br>2618 \
(0x0a3a),   (0x), _ZN25QCandlestickSeriesPrivate18handleSeriesChangeEP15QAbstractSeries, \
0x000df070, Demumble<br>2619 (0x0a3b),   (0x), \
_ZN25QCandlestickSeriesPrivate18handleSeriesRemoveEP15QAbstractSeries, 0x000df090, \
Demumble<br>2620 (0x0a3c),   (0x), \
_ZN25QCandlestickSeriesPrivate18initializeGraphicsEP13QGraphicsItem, 0x000ded80, \
Demumble<br>2621 (0x0a3d),   (0x), \
_ZN25QCandlestickSeriesPrivate18qt_static_metacallEP7QObjectN11QMetaObject4CallEiPPv, \
0x000df9c0, Demumble<br>2622 (0x0a3e),   (0x), \
_ZN25QCandlestickSeriesPrivate19createLegendMarkersEP7QLegend, 0x000def10, \
Demumble<br>2623 (0x0a3f),   (0x), \
_ZN25QCandlestickSeriesPrivate19updatedCandlesticksEv, 0x000dfe60, Demumble<br>2624 \
(0x0a40),   (0x), _ZN25QCandlestickSeriesPrivate20initializeAnimationsE6QFlagsIN6QChart15AnimationOptionEEiR12QEasingCurve, \
0x000dee70, Demumble</div><div class="gmail_default" \
style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div \
class="gmail_default" \
style="font-family:arial,helvetica,sans-serif;font-size:small">You might try \
replacing Qt6Charts.dll with the one from PySide6.<br></div></div><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Dec 15, 2023 at \
4:57 PM Patrick Stinson &lt;<a href="mailto:patrickkidd@gmail.com" \
target="_blank">patrickkidd@gmail.com</a>&gt; wrote:<br></div><blockquote \
class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex">I might add that this was done in a virtual \
environment created by pipenv. Looks like it works when using the system installed \
python.<br> <br>
&gt; On Dec 14, 2023, at 5:41 PM, Patrick Stinson &lt;<a \
href="mailto:patrickkidd@gmail.com" target="_blank">patrickkidd@gmail.com</a>&gt; \
wrote:<br> &gt; <br>
&gt; I get a DLL linking error with a clean python 3.9.13 install and &quot;pip \
install pyqt6&quot; on windows. This occurs on every machine I try it on in our lab, \
whether windows 10 or windows 11. Installing &quot;pyqt6-tools&quot; gets me going \
for just pyqt6. I am doing a lot of pretty basic stuff so I am not tied to a \
particular pyqt6 or Qt6 version.<br> &gt; <br>
&gt; Now I want to use pyqt6-charts and I am getting the DLL error again: &quot;DLL \
load failed while importing QtCharts: the specified procedure can&#39;t be \
found.&quot;<br> &gt; <br>
&gt; Are the pyqt6 wheels all really broken? Is it my python version? The wheels do \
include the qt binaries so what is going on? This problem is easily reproducible so I \
thought there might be a straightforward answer here.<br> &gt; <br>
&gt; Cheers<br>
&gt; -Patrick<br>
</blockquote></div>
</blockquote></div>
</blockquote></div>



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

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