![]() |
Error importing PyQt5 - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120) +--- Forum: PinePhone Software (https://forum.pine64.org/forumdisplay.php?fid=121) +---- Forum: PostmarketOS on PinePhone (https://forum.pine64.org/forumdisplay.php?fid=124) +---- Thread: Error importing PyQt5 (/showthread.php?tid=9228) |
Error importing PyQt5 - bunburya - 02-19-2020 Hi everyone, I am looking into building GUIs with Python on postmarketOS. I am (currently) using plasma-mobile so I figured it would make sense to use PyQt5, maybe with Kirigami. So I installed py3-qt5 (version 5.13.1-r1) from the community repository using APK. However, when I go to import QtGui from PyQt5 in python3 I get the following error: Code: Python 3.8.1 (default, Jan 19 2020, 11:48:03) Trying to import QtWidgets gives the same error. As well as the required dependencies for py3-qt5, I also installed py3-opengl to see if it would solve the problem (given the content of the error message) but it didn't help. I also installed qutebrowser and its dependencies and, although I can't see the full error message it returns, it appears to have the exact same problem. The full list of packages I have installed can be found at https://pastebin.com/HmgzaNPm. Can anyone shed any light of what is wrong here? Googling around doesn't really yield any relevant results. I am reasonably familiar with Python but less so with Qt or C++. So I'm not sure if I am missing something here. Thanks! RE: Error importing PyQt5 - PureTryOut - 02-20-2020 Seems like PyQt5 needs a rebuild. However, I just tried the same on my Alpine laptop (running the latest edge) and it works fine, so I guess it has been rebuild already. Please update your system, `apk update && apk upgrade -a`, and try again RE: Error importing PyQt5 - bunburya - 02-20-2020 Hi there, thanks for your advice. I ran update and upgrade -a and the issue remains. For the record, py3-qt5 was not upgraded (nor were any qt-related packages). Interesting that you do not have the same issue on your laptop. Is anyone able to replicate this on a pinephone? RE: Error importing PyQt5 - PureTryOut - 02-21-2020 Although "upgrade -a" should've already installed the latest version available, could you verify that you have py3-qt5 version 5.13.1-r1 installed? "apk list -I | grep py3-qt5" RE: Error importing PyQt5 - bunburya - 02-21-2020 Confirmed: Code: py3-qt5-5.13.1-r1 aarch64 {py3-qt5} (GPL-2.0-or-later) [installed] RE: Error importing PyQt5 - PureTryOut - 02-22-2020 Well I guess the only thing you can do then is rebuild the package yourself. RE: Error importing PyQt5 - anjanmomi - 02-23-2020 I had the same bug. I reported it to alpine linux's aports here: https://gitlab.alpinelinux.org/alpine/aports/issues/11244 trying to build py3-qt5 with the supplied APKBUILD results in: Code: >>> py3-qt5: Analyzing dependencies... As per the alpinelinux dev's request. I have reported the issue on pmos issue tracker: https://gitlab.com/postmarketOS/pmaports/issues/454 RE: Error importing PyQt5 - PureTryOut - 02-23-2020 Ah yeah the mesa-git mess is a pmOS specific bug, py3-qt5 not working in the first place is an Alpine Linux one. RE: Error importing PyQt5 - bunburya - 02-23-2020 Thanks both! It's good to know that at least it's reproducible, and thanks anjanmomi for filing the issue. RE: Error importing PyQt5 - PureTryOut - 02-25-2020 Btw the original issue of this thread is now resolved. Just upgrade your system! Code: apk update (note the "--available" switch) |