Installed python3-gobject, but error: ModuleNotFoundError: No module named 'gi'

I followed instructions at PyGObject — Fedora Developer Portal

$ sudo dnf install python3-gobject
Last metadata expiration check: 0:12:23 ago on Mon 19 Jun 2023 16:53:45 CEST.
Package python3-gobject-3.44.1-1.fc38.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
$ python
Python 3.11.3 (main, Apr  4 2023, 22:36:41) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import gi
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'gi'

What should I do?

That isn’t the system python; F38 python is built with GCC 13.

How are you running python there? In a virtual environment, via some tool like conda, in VSCode terminal, …?