![]() |
#1 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Dec 2022
Device: Kindle
|
Compile PyQt5/6 with Python3
Hello, sorry if it has been asked before. I've tried to search but no luck.
I'm trying to write an app with python + qt, currently it's using python2 + pyqt4 which are very old. Anyone please could help me to compile pyqt5/6 with python3? I've tried also the koxtoolchain but always gave me error compiling qt5. Thanks |
![]() |
![]() |
![]() |
#2 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Fair warning: Here be dragons. You're in for a world of hurt.
That said, Qt5 *has* successfully been built in the past, but I haven't looked at it in a couple of years, and things haven't really gotten easier with Qt6, from what I heard... I was *not* masochistic enough to even attempt to deal with PyQt/PySide, though; which promises to send you to yet another deeper level of hell, as it's already hilariously unfun on *native* builds... Last edited by NiLuJe; 03-13-2023 at 03:20 PM. Reason: bragons? Those two keys are nowhere *near* each other :D. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Also, keep in mind that if you want to target non-X devices (i.e., FW < 5), you'll need to write a custom QPA (and I'm not even sure if Qt6 still has a linuxfb backend to help with that...).
Last edited by NiLuJe; 03-13-2023 at 12:18 PM. |
![]() |
![]() |
![]() |
#4 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
The recap of this extremely painful endeavor would be https://github.com/pgaskin/NickelTC
It's for Kobo, and as such targets an old Qt5 version, but my original script *does* support a more recent (but still old nowadays) LTS release. I did *zero* runtime checking on that, though; it was just used as a sanity check to ensure this was actually even remotely doable without going completely mad. |
![]() |
![]() |
![]() |
#5 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
I'll reiterate that unless embedded systems stuff is your actual job, and/or you have a mountain of time and sanity to throw at the problem, I would run away screaming and opt for a different approach altogether.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
As was mentioned in another recent x-compile thread, going the buildroot way *might* ease some of the pain; as it appears to have packages for pyqt5
![]() |
![]() |
![]() |
![]() |
#7 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Dec 2022
Device: Kindle
|
Thank you very much @NiLuJe!!!
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Importing QJSEngine from PyQt5.QtQml, not found | mastertea | Development | 1 | 10-18-2019 09:04 PM |
Python3 on Aura One | Kristoffer_1 | Kobo Developer's Corner | 5 | 07-06-2019 06:20 PM |
Building from source - PyQt5 with Python 2.7 | faredoon | Development | 8 | 02-06-2018 08:01 PM |
Install Problems With PyQt5 (Win64) | stanking | Plugins | 2 | 10-06-2014 03:28 AM |
No module named PyQt5.Qt | silentfuzzle | Development | 2 | 08-19-2014 12:31 PM |