ibus: ImportError: No module named gtk
故障:可以打字,不能出现图形界面。
root@ocean:~# ibus-setup
Traceback (most recent call last):
File "/usr/share/ibus/setup/main.py", line 28, in <module>
import gtk
ImportError: No module named gtk
root@ocean:~# apt-get install gtk
Reading package lists... Done
Building dependency tree 1.apt-get install python-gtk2 python-gtk2-dbg python-gtk2-dev python-gtk2-doc
如果全部安装还是出现问题,就进入步骤2
2.查看系统的默认python,进入系统的默认python后,输入import gtk
Traceback (most recent call last):
ImportError: No module named gtk
解决办法:
1.修改系统默认的python,选用一个可以,import gtk成功的版本。
rm /usr/local/bin/python
rm /usr/local/bin/python2
2.将现有的默认python,安装pygtk.