3

I am trying to run ibus-setup and getting the following

$ ibus-setup
Traceback (most recent call last):
  File "/usr/share/ibus/setup/main.py", line 31, in <module>
    from gi.repository import GLib
ImportError: No module named 'gi'

Neigther of the following helped:

pip install gi
pip install pgi
sudo apt install python-gi
sudo apt install python3-gi

How to run ibus-setup?

Dims
  • 3,181
  • 9
  • 49
  • 107

2 Answers2

2

I had the same error message and it was caused by using non-system python interpreter. When asking:

which python3 -a

I got two paths: ~/anaconda3/bin/python3 and /usr/bin/python3

Solution was to give priority to system python interpreter by:

export PATH=/usr/bin:$PATH
0

this is because ibus-setup is runs python /usr/share/ibus/setup/main.py which on your system is python 3. You can fix this by running python2 /usr/share/ibus/setup/main.py.

Arne
  • 1