PyGTK - 1.5.2 not 2.1

Ignacio Vazquez-Abrams ignacio at
Sun Aug 26 04:16:54 CEST 2001

On Sat, 25 Aug 2001, Adam 'Vonlia' Seyfarth wrote:

> On Sat, 25 Aug 2001, Ignacio Vazquez-Abrams wrote:
> > On Sat, 25 Aug 2001, Adam 'Vonlia' Seyfarth wrote:
> >
> > > Hi python people -
> > > 	I was trying to find a gfx package for Python, and I tried it.
> > > I have python aliased to /usr/local/bin/python2.1 and running python on
> > > their examples said it couldn't find the module gtk.  But after
> > > unalias-ing it, they worked, and it is cool!  I would rather use
> > > Python2.1 if I can, but I don't use it's features, so I don't care much.
> > > But, do other people use PyGTK with 2.1?
> >
> > Back in November 2000 a very similar question was asked on the PyGTK mailing
> > list, except it was with Python 2.0. The answer was basically "recompile it
> > with the newer version of Python". Try that and see if it works.
> After it didn't work the first time, I immediately recompiled.  ie, I
> did ./configure; make; sudo make install again and it still didn't work.

After poking around, I've determined that you have to change certain variables
in the Makefile in order to compile it against the Python 2 libs and install
in the right place.

> > OTOH, it may be that the PyGTK libraries only exist in your Python 1.5
> > site-packages directory. Check that, but I suggest the recompile.
> I imagine that's what it is.  Sorry for my ignorance, but how do I check
> it?

In each version of Python, type the following:

import os
print os.path.dirname(os.__file__)

Add '/site-packages' to both values and check those directories. However, I
still suggest doing the recompile.

Ignacio Vazquez-Abrams  <ignacio at>

More information about the Python-list mailing list