Using anaconda as your python virtual env can cause some confounding issues sometimes. It didn't disappoint me this time around. When opening Ibus preferences or ibus-setup, I got this error: ImportError: No module named 'gi'
.
To solve this problem, first make sure you have gi installed. Then you want to create a soft link so Anaconda's python can load the module from your system install.
- Run your system python install
/usr/bin/python3
-
See the path to gi
import gi
print(gi)
exit()
-
Create a softlink. Make sure both python versions match. Otherwise an error may occur.
ln -s /usr/lib/python3.8/site-packages/gi/ ~/miniconda3/lib/python3.8/site-packages/
(Change the path correctly according to your system)
-
Test if you can import in your anaconda python install
python
import gi
- Your Ibus preferences should run now.