Public bug reported:

Krita 6.0.1~ufsg-0ubuntu2 from Ubuntu 26.04 (Resolute) has broken
Python scripting when both PyQt5 and PyQt6 are installed.

Krita reports on startup:

Found PyQt5 in '/usr/lib/python3/dist-packages', removing from Python's search 
path to avoid crashes.
Python cannot find the Qt5 bindings.
Please make sure, that the needed packages are installed.

krita.scripting: "Traceback (most recent call last):"
krita.scripting: "  File 
\"/usr/lib/x86_64-linux-gnu/krita-python-libs/krita/__init__.py\", line 28, in 
<module>"
krita.scripting: "    from PyQt5 import QtCore"
krita.scripting: "ModuleNotFoundError: No module named 'PyQt5'"
krita.scripting: "Could not import krita"

As a result, Python scripting does not work correctly in Krita and the
Scripts menu is unusable.

PyQt5 is installed and works correctly outside Krita:

$ python3 -c "from PyQt5 import QtCore; print(QtCore.PYQT_VERSION_STR)"
5.15.11

PyQt6 is also installed:

$ python3 -c "import PyQt6; print('PyQt6 vorhanden')"
PyQt6 vorhanden

Installed relevant packages:

krita 1:6.0.1~ufsg-0ubuntu2
python3-pyqt5 5.15.11+dfsg-3build3
python3-pyqt6 6.10.2-2build5

The normal Python search path contains:

/usr/lib/python3/dist-packages

and this directory contains the working PyQt5 installation:

/usr/lib/python3/dist-packages/PyQt5/

The problem appears to be that Krita detects PyQt5 in the system
Python path and removes that path to avoid a PyQt5/PyQt6 conflict,
but then Krita's own scripting module still imports PyQt5.

Krita's 6.0.1 release notes explicitly state that distributions
packaging both PyQt5 and PyQt6 need to apply the "Disallow importing
conflicting version of PyQt" patch.

Expected behavior:
Krita's Python scripting should initialize successfully when the
Ubuntu PyQt5/PyQt6 packages are installed.


python3 --version
Python 3.14.4

ProblemType: Bug
DistroRelease: Ubuntu 26.04
Package: krita 1:6.0.1~ufsg-0ubuntu2
ProcVersionSignature: Ubuntu 7.0.0-29.29-generic 7.0.12
Uname: Linux 7.0.0-29-generic x86_64
ApportVersion: 2.34.1-0ubuntu0.1
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: KDE
Date: Mon Aug 17 19:08:13 2026
InstallationDate: Installed on 2025-10-25 (296 days ago)
InstallationMedia: Kubuntu 25.10 "Questing Quokka" - Release amd64 (20251007)
SourcePackage: krita
UpgradeStatus: Upgraded to resolute on 2026-06-24 (54 days ago)

** Affects: krita (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug resolute wayland-session

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2163676

Title:
  Krita 6.0.1 Python scripting broken when PyQt5 and PyQt6 are installed

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/krita/+bug/2163676/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to