cannot import gtk

Dave Reed dreed at capital.edu
Mon Nov 25 14:31:23 EST 2002


> From: Pascal Ronecker <ronecker at noos.fr>
> Cc: python-list at python.org
> Content-Type: text/plain
> Date: 25 Nov 2002 19:56:33 +0100
> Content-Length: 1651
> 
> Thanks !
> 
> but i'm still stuck.
> 
> For example : GtkText does not exist, neither does Text alone.
> 
> What is more, i have other problems with "from gnome.ui import GnomeApp"
> and so on.Changing all the code seems a long way to me.
> (it is the "eroaster" cd burning tool, a nice all-in-one)
> 
> 
> Maybe the right solution is to "install the bindings" as you say, but i
> do not have the slightest idea as to what it means...
> 
> So if you could explain a bit that last bit, ...
> thx !!

> 
> Lenny


You need to know if eroaster wants gtk 1.2 or gtk2. I'm guessing 1.2
for a couple reasons (gtk2 is relatively new so most older programs
still use 1.2). It does appear with pygtk1.2 that the Gtk prefix is
still there so "from gtk import GtkVBox" is what you want, but with
pygtk2 you don't.

You'll need to download the file: 
gnome-python-1.4.2.tar.gz
which you can find on the gnome.org ftp site and install it with the
usual:

tar zxf gnome-python-1.4.2.tar.gz
cd gnome-python-1.4.2
./configure
make
make install

this will put the pygtk1.2 files in
/usr/local/lib/python2.2/site-packages

so you'll need to add that directory to your PYTHONPATH environment
variable.

HTH,
Dave




More information about the Python-list mailing list