I was setting up an environment to code a plugin for Gourmet Recipe Manager, and ran into trouble. The script was reporting:
ImportError: No module named gtk
Turns out I had to install PyGTK. I did that, but it still wasn't working. So I found a series of tests to do:
$ python Python 2.3.5 (#2, Jun 19 2005, 13:28:00) [GCC 3.3.6 (Debian 1:3.3.6-6)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import pygtk; pygtk.require('2.0') >>> import gtk >>> gtk.Window>>>
That showed me it wasn't installed correctly (duh!) and I quickly realized that I had inadvertently installed the wrong PyGTK package. I downloaded the "all in one" PyGTK package (which I had missed before, since I didn't read the full filename), and it worked.
Last updated on 2011-03-30 00:19:50 -0800, by Shalom CraimerBack to Tech Journal