尽管我安装了 python 的 gtk 绑定,但以下代码失败。这是一台 debian 机器,我安装了名为 python-gtk2 的包
>>> import gtk
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named gtk
我怎样才能解决这个问题?
Edit1:根据评论请求:Python 2.7.3rc2(默认,2012 年 5 月 22 日,01:05:47)
Edit2:根据评论请求:
>>> print sys.path
['', '/home/lorb', '/usr/lib/python2.7/dist-packages', '/usr/local/lib/python27.zip', '/usr/local/lib/python2.7', '/usr/local/lib/python2.7/plat-linux2', '/usr/local/lib/python2.7/lib-tk', '/usr/local/lib/python2.7/lib-old', '/usr/local/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/site-packages', '/usr/local/lib/python2.7/site-packages/SpssClient200', '/usr/local/lib/python2.7/site-packages/spss200']