[pygtk] Help/Advice iwth install/setup issue?

David Ripton dripton at ripton.net
Fri Feb 6 04:53:23 WST 2009

On 2009.02.05 10:59:31 -0800, Ian Peters-Campbell wrote:
> When I set up my CentOS 5 system it had Python 2.4.  I upgrades to Python
> 2.5 in order to run Buildbot.  Unfortunately I am running into a problem
> where Buildbot is calling to Zope, which is in turn attempting to import
> gobject, which fails.
> If I start my Python2.4 interpreter I can import gobject fine.  I tried
> installing pygobject 2.16.0 from source, but it failed to configure saying
> it could not find glib > 2.14.0.

Not surprising since CentOS still ships 2.12

> config.log, about 2/3 through, says 'glib_major_version' undeclared, and the
> error seems to repeat for minor and micro.
> I downloaded glib 2.18.4 and attempted to install that from source, whih
> went off without a hitch.  Returning and attempting to install pygobject
> 2.16.0 and I get the same error, with it claiming that it is unable to find
> glib > 2.14 and with the same errors in the log.

It found the old one instead of the one you just installed.

> I am sure there is something simple I am doing wrong, but my Linux-Fu is a
> little rusty.  Can anyone point me in the right direction for getting Python
> 2.5 to find and use gobject?

I see two paths to victory.

One is finding the magic configure option to tell configure exactly
which glib to use.  This will probably be something short and
obvious-in-hindsight like --glib=/usr/local/lib/libglib-2.0.so, but
since configure --help doesn't actually tell you all the options, it may
require digging around. 

The other is installing an older version of pygobject, which is
compatible with glib 2.12.  Then finding the platform glib will be fine.

The Python libraries for the platform Python 2.4 (/usr/lib/python2.4)
and for your Python 2.5 (probably /usr/local/lib/python2.5) are
completely independent.  You have to install everything again for 2.5.
But if you don't actually need features or bugfixes from the newer
version of a Python library, it's easier to use the same old version
that CentOS uses, because you know all its C library prerequisities are
already installed.

David Ripton    dripton at ripton.net

More information about the pygtk mailing list