Created attachment 191029 [details] My really dumb patch to fix this *** If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports Please remove this comment after reading and before submitting - thanks! *** SUMMARY https://invent.kde.org/graphics/krita/-/commit/38bbeb8a1882150379fafde54f25222e5fade146 This commit introduced a way to dynamically load either PyQT5 or PyQT6, but ends up removing /usr/lib/python3.14/site-packages from sys.path, breaking all built-in plugins. STEPS TO REPRODUCE 1. Lauch Krita 6.0.0-1 on Arch or CachyOS 2. Open settings and observe broken plugins OBSERVED RESULT No plugins can be loaded EXPECTED RESULT Built-in plugins available SOFTWARE/OS VERSIONS Linux/KDE Plasma: ArchLinux KDE Frameworks Version: 25.12.3-1.1 Qt Version: 6.10.2-1 ADDITIONAL INFORMATION https://dpaste.com/5LLS6GZZ5
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/2723
Is this is with a distro build relying on system site-packages where there happen to be two version of PyQt installed? Krita is looking for PyQt6 but found PyQt5 and tried to remove that. (The error message which says it can't find the Qt5 bindings is misleading.) Re-adding the system site-packages would re-add PyQt5, which would crash Krita if accessed by outdated user plugins. (Built-in plugins prioritize PyQt6, so they only crash the other way around.) I have a potential fix in the above merge request which is built on those assumptions. It re-adds the other modules beside where the conflicting PyQt was found. So if PyQt5 and PyQt6 were in the same site-packages folder, it would be able to find the right one.
(In reply to Freya Lupen from comment #2) > Is this is with a distro build relying on system site-packages where there > happen to be two version of PyQt installed? > > Krita is looking for PyQt6 but found PyQt5 and tried to remove that. (The > error message which says it can't find the Qt5 bindings is misleading.) > Re-adding the system site-packages would re-add PyQt5, which would crash > Krita if accessed by outdated user plugins. (Built-in plugins prioritize > PyQt6, so they only crash the other way around.) > > I have a potential fix in the above merge request which is built on those > assumptions. > It re-adds the other modules beside where the conflicting PyQt was found. > So if PyQt5 and PyQt6 were in the same site-packages folder, it would be > able to find the right one. Yes, both python-pyqt6 and python-pyqt5 are installed at the same time, you're correct
*** Bug 518195 has been marked as a duplicate of this bug. ***
https://dpaste.com/GDXHL8SX6 I tried using __init__.py from this MR - https://invent.kde.org/graphics/krita/-/merge_requests/2723 It looks like it's not fixing the issue. If importlib.util.find_spec("PyQt5") returns None, the os.scandir never runs. So PyQt6 is not going to be imported. I've made another patch based on that MR that, once again, fixes this on my system. (attaching as new.patch)
Created attachment 191055 [details] new patch based on !2723
*** Bug 518233 has been marked as a duplicate of this bug. ***
I've updated the MR to remove the sys.path modifications, could you test if it works now?
(In reply to Freya Lupen from comment #8) > I've updated the MR to remove the sys.path modifications, could you test if > it works now? It does! Thank you.
*** Bug 518249 has been marked as a duplicate of this bug. ***
Git commit f6d7040613dd49aa47e74f7c55590f3e553125c9 by Dmitry Kazakov, on behalf of Freya Lupen. Committed on 01/04/2026 at 09:09. Pushed by dkazakov into branch 'master'. Disallow importing conflicting version of PyQt This replaces the sys.path modification with a better hack. Now we simply override builtins.__import__ to raise a ModuleNotFoundError if an attempt is made to load the wrong PyQt. M +15 -16 plugins/extensions/pykrita/plugin/krita/__init__.py https://invent.kde.org/graphics/krita/-/commit/f6d7040613dd49aa47e74f7c55590f3e553125c9
Git commit 731367f8245dcc3889ad6445d6da426432c5bfc8 by Dmitry Kazakov, on behalf of Freya Lupen. Committed on 01/04/2026 at 09:25. Pushed by dkazakov into branch 'krita/6.0'. Disallow importing conflicting version of PyQt This replaces the sys.path modification with a better hack. Now we simply override builtins.__import__ to raise a ModuleNotFoundError if an attempt is made to load the wrong PyQt. M +15 -16 plugins/extensions/pykrita/plugin/krita/__init__.py https://invent.kde.org/graphics/krita/-/commit/731367f8245dcc3889ad6445d6da426432c5bfc8