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  Reading state information... Done E: Unable to locate package gtk
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):
  File "<stdin>", line 1, in <module>
ImportError: No module named gtk
解决办法:
1.修改系统默认的python,选用一个可以,import gtk成功的版本。
rm  /usr/local/bin/python
rm  /usr/local/bin/python2
2.将现有的默认python,安装pygtk.
 
posted @ 2013-04-21 12:58  adodo1  Views(451)  Comments(0Edit  收藏  举报