I'd like to run a code that uses the gi-module. I'm not quite sure why it's not able to find the module.

The python-gobject is installed and used by other programs. I already reinstalled python-gobject, but it's still giving the same problem.

The error I get is:

Dependency missing: python-gobject No module named 'gi'

I'm using Python 3.7.3 on an Arch Linux System.

Thanks in advance.

  • Do you use a python version from the AUR? I guess, you have to create the python37-gobject package. It doesn't exist in the AUR. wiki.archlinux.org/index.php/Python#Old_versions
    – ctx
    Dec 26 '19 at 16:26
  • Thanks for the Answer. I forgot that I installed python via AUR.
    – MoeJo
    Dec 26 '19 at 17:52

You need to install PyGObject with python -m pip install PyGObject. Brace yourself, problem related to cairo library missng are coming!

  • Needed to run sudo apt install libgirepository1.0-dev on Ubuntu and Python 3.9, then the install PyGObject was successful in PyCharm and now playsound works (slightly different problem needed the same solution) Nov 23 '20 at 7:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.