How to get libadwaita working with PyGObject under Fedora 38?

I recently moved from Ubuntu to Fedora.

I tried a small project I made on Ubuntu in the past using the PyGObject python module.

In addition to many GTK 4 widgets, I used some from libadwaita.

I followed Getting Started - PyGObject to setup PyGObject (tried both methods)

But running the file doesn’t work:

Traceback (most recent call last):
  File "file.py", line 8, in <module>
    gi.require_version("Adw", "1.0")
  File "/usr/lib64/python3.11/site-packages/gi/__init__.py", line 129, in require_version
    raise ValueError('Namespace %s not available for version %s' %
ValueError: Namespace Adw not available for version 1.0

If I replace the version number with the exact one installed (1.3) it still do not work.

I have installed the libadwaita-devel package too.

Under my Ubuntu 22.04 it worked out of the box.

The version here is “1” instead of “1.0”. Most libraries don’t use the point release for introspection, so we left it off completely.

Thank you it worked!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.