Can't import default pyqt6 wheels on windows

Charles peacech at gmail.com
Fri Dec 15 11:27:56 GMT 2023


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 at 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 at 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 at 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 at 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
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20231215/5961d7ca/attachment.htm>


More information about the PyQt mailing list