Module "org.kde.kirigami" is not installed

import org.kde.kirigami as Kirigami
qt.dbus.integration: Could not connect "org.freedesktop.IBus" to globalEngineChanged(QString)
QQmlApplicationEngine failed to load component
file:///home/rokejulianlockhart/RTBJK9/code/manage_monitors/code/attempts/1 (QML)/manage_monitors-0/ui/main.qml:10:1: module "org.kde.kirigami" is not installed
1 Like

This means you need to install Kirigami. :slight_smile: Or if you already have it, then you need to install its companion dev package.

4 Likes

Thanks.

@ngraham, any idea of what the package name might be? Or better yet, which exact filenames I can query my distribution’s repositories for, like a .so?

Without knowing which distro you’re using, not really. And even then, I’m no tfamiliar with the packaging details of every distro. You can try searching for “kirigami” using your package manager.

1 Like

Thanks, but I have at least tried that.


Do you know whether there’s at least a specific binary I can search for with cnf that would identify Kirigami and/or its development counterpart? If not, do you know of any distributions that definitely do package Kirigami?

I have a feeling that it’s a dependency that’s erroneously not packaged by OpenSUSE factory, since MyGNUHealth reports it as unavailable, too:

https://www.reddit.com/r/MyGNUHealth/comments/11m3x8e/pyside2_fails_to_install_and_when_manually/?utm_source=share&utm_medium=web2x&context=3

At this point, it seems like a good question for your distro.

1 Like

Not much success there for this kind of question. I suppose I’ll just have to wait. Thanks.

I’ve at least asked more directly:

https://forums.opensuse.org/t/is-kirigami-packaged-in-obs-factory/166473

It turns out that kirigami2 is installed, just not kirigami:

Is kirigami necessary too?

https://www.reddit.com/r/MyGNUHealth/comments/11m3x8e/comment/jm3z54y/?utm_source=share&utm_medium=web2x&context=3

at least worked for MyGNUHealth. Considering

it might be the solution, or part of it.

Next time, mention you’re working with PySide (2 or 6) and the distro you’re using in the first message, otherwise commenters won’t be able to help you. There is clearly an XY problem here too.

Did you see https://dimitris.cc/kde/2022/02/26/pyside-blog-post.html ? This is the best documentation we have right now, as [ci skip]Adding PySide. (!270) · Merge requests · Documentation / Developer Tutorial and Article Site · GitLab isn’t finished.

If you’re creating your own application with PySide2 and you want to package it, you’ll need to install python3-pyside2-devel and kirigami2-devel on openSUSE, as pip won’t work for this.

If you’re creating your app with PySide6, I believe it’s expected that you won’t find Kirigami, because your app will search for Kirigami built with Qt6. You’d need to manually point to self-built Kirigami (with the generated prefix.sh). I have a blog post about this that is mostly ready, but I’m currently busy with something else.

Nope. I think that package is just there for compatibility purposes.

1 Like

The errors like:

module "org.kde.kirigami" is not installed
module "org.kde.desktop" is not installed
kf.kirigami.platform: Failed to find a Kirigami platform plugin for style "Fusion"

mean that the Qt Quick QML engine can’t find some required QML modules and style plugins.

  • The first two errors indicate that the Kirigami (org.kde.kirigami) and KDE desktop style (org.kde.desktop) QML modules are missing from the engine’s import paths.
  • The third error occurs because Kirigami is trying to use the Fusion style, but the corresponding Kirigami platform plugin for that style is not found. This usually happens when the style is not explicitly set to org.kde.desktop and the fallback style (Fusion) is used instead.

When using PyQt6 inside a virtual environment, Qt sometimes won’t automatically find the system QML and plugin directories, so you need to manually configure them before loading your QML files.

Below is a working example for PyQt6. If you’re using PySide6, the logic is the same, but class/module names will change slightly.

import os
import sys
from PyQt6.QtCore import QUrl
from PyQt6.QtGui import QGuiApplication
from PyQt6.QtQml import QQmlApplicationEngine

# 1. Construct the path to the PyQt6 plugins directory inside your virtual environment
pyqt6_plugins_path = os.path.join(
    sys.prefix,  # Path to your virtual environment root
    'lib',
    f'python{sys.version_info.major}.{sys.version_info.minor}',
    'site-packages', 'PyQt6', 'Qt6', 'plugins'
)

# 2. Tell Qt where to find its plugins
#    We combine the PyQt6 plugin path with the system-wide Qt plugin path.
os.environ['QT_PLUGIN_PATH'] = f'{pyqt6_plugins_path}:/usr/lib/qt6/plugins'

# 3. Set the style for Qt Quick Controls to "org.kde.desktop"
#    This avoids the fallback to "Fusion" and ensures the Kirigami platform plugin can be found.
os.environ["QT_QUICK_CONTROLS_STYLE"] = "org.kde.desktop"

# 4. Create the Qt application and QML engine
app = QGuiApplication(sys.argv)
engine = QQmlApplicationEngine()

# 5. Add the system QML import path so Kirigami and KDE styles can be found
#    This is where your OS stores the QML modules like org.kde.kirigami.
engine.addImportPath("/usr/lib/qt6/qml")

# 6. Now load your main QML file
engine.load(QUrl.fromLocalFile("main.qml"))

if not engine.rootObjects():
    sys.exit(-1)

sys.exit(app.exec())

Why this works

  • engine.addImportPath("/usr/lib/qt6/qml"): Makes the QML engine look in the system directory where org.kde.kirigami and org.kde.desktop are installed. Without this, it will only search in your virtual environment’s limited QML path.
  • QT_PLUGIN_PATH: Ensures that Qt can find the platform and style plugins it needs for rendering Kirigami components.
  • QT_QUICK_CONTROLS_STYLE: Forces Kirigami to use the KDE desktop style instead of falling back to the “Fusion” style. This prevents the Failed to find a Kirigami platform plugin for style "Fusion" warning and ensures the application uses the correct native look.

If you’re on another platform (e.g., Windows or macOS), you’ll need to adjust the paths accordingly.

Please stop spamming multiple topics with the same, clearly LLM-generated code that has nothing to do with the solution.

1 Like

@Herzenschein, yeah, the solution appeared to be that pip3 didn’t export some libraries and executables to $PATH, whereas rpm did:

If any of what @sameepvicky has stated is a solution, it’s hacky at best.