Hey. I found this during a Google search and I'm just replying in case anybody is still subscribed to this. If not, then at least, this information is here for the next person who comes along.
Information:
I have the following software installed.
Debian Sarge Kernel 2.6.8-2-k7 (Yes, I know it's not Yoper, keep reading)
Python 2.3
libgtk2.0. Somehow, libgtk1.2 got installed in some patch or another. So it appears I have both.
KDE 3.3.2
The problem software I was having was with BitTorrent 4.0.1.
Whenever I attempted to launch btdownloadgui.py, I would receive the following error:
Code:
btdownloadgui.py
Traceback (most recent call last):
File "/usr/bin/btdownloadgui.py", line 27, in ?
import gtk
ImportError: No module named gtk
What I did to resolve this:
Obviously, I'm missing something crucial here. I have Python and I have GTK, so why can't either one find each other? I really wanted these two to meet and spawn little children. So I started with Google. No direct answers, but I did find a few hints from as far back as 2002-3. Clearly, I needed to introduce GTK to Python. So I needed a library.
After a lot of fiddling with
I finally came across an interesting Debian packages with their descriptions.
python2.3-glade2 - GTK+ bindings: Glade support
python2.3-gtk2 - Python bindings for the GTK+ widget set
OK, this and their corresponding 1.2 looked like the kind of toys I needed to get Mr. Python to meet Miss. GTK.
To cut to the chase, a simple
Code:
apt-get install python-glade2
will introduce
python2.3-glade2, python2.3-gtk2, and python2.3-numeric
into the mix. Then I went back and tried to run btdownloadgui.py and voila! Python and GTK meet and they're now happily playing.
Wrap up
Point is, it looks like there's a missing Python library for GTK. I think you need to install this library to resolve the problem. Since I'm using Debian, some of these versions might be slightly behind the main branches. And you'll have to figure it out what the package names are for other distros like Yoper or RedHat.
But I'm leaving this here in the hopes that the next person who searches for a solution will find the clues they need from this post.
Happy Trails