Installation problem: gobject not found

I just did a fresh install of python 2.5.1, numpy-1.0.3.1.win32-py2.5.exe,
and matplotlib-0.90.1.win32-py2.5.exe. When I try to run the following
script:

from __future__ import division
from pylab import *

plot([1,2,3])
show()

I get the following traceback:

Traceback (most recent call last):
File "a.py", line 5, in <module>
from pylab import *
File "C:\python251\Lib\site-packages\pylab.py", line 1, in <module>
from matplotlib.pylab import *
File "c:\python251\lib\site-packages\matplotlib\pylab.py", line 222, in
<modul

new_figure_manager, draw_if_interactive, show = pylab_setup()
File "C:\python251\Lib\site-packages\matplotlib\backends\__init__.py",
line 24
, in pylab_setup
globals(),locals(),[backend_name])
File
"c:\python251\lib\site-packages\matplotlib\backends\backend_gtkagg.py", l
ine 10, in <module>
from matplotlib.backends.backend_gtk import gtk, FigureManagerGTK,
FigureCan
vasGTK,\
File "C:\python251\Lib\site-packages\matplotlib\backends\backend_gtk.py",
line
6, in <module>
import gobject
ImportError: No module named gobject

···

--------------------------------------------------
Note: I had been using the Enthought edition of python (2.4.3 version of
python) and matplotlib and everything worked great. I then tried to
install the map addition to matplotlib and the installation failed. After
that, I started getting the import error on gobject, which I assume is
something from GTK.

Does anyone have any suggestions on how to fix this? I'm pretty helpless
right now without matplotlib, as I use it to generate graphs for a
technical document I'm writing.

Please respond to:

Don Peterson
donp@...1268...

Note: I had been using the Enthought edition of python (2.4.3 version of
python) and matplotlib and everything worked great. I then tried to
install the map addition to matplotlib and the installation failed. After
that, I started getting the import error on gobject, which I assume is
something from GTK.

Does anyone have any suggestions on how to fix this? I'm pretty helpless
right now without matplotlib, as I use it to generate graphs for a
technical document I'm writing.

For some reason, your backend is being set to GTKAgg, though this
should not be the default on windows. If you want to use GTK, you can
install pygtk which has a win32 installer. But more likely, you don't
want this, so you need to find your matplotlib rc file and change the
backend bariable o TkAgg (i you ant to use TkInter) or WXAgg (if you
want to use wxpython). If you are usin the enthought tools, you may
want to consider WxAgg since many of their tools work with wx.

The easiest way to find your matplotlib rc file is to run a simple
script that imports pylab with the --verbose-helpful flag, eg

python myscript.py --verbose-helpful

and it will print a line telling you the path to the matplotlib rc
file. Change the backend line from GTKAgg to the desired backend.

JDH

···

On Nov 9, 2007 1:08 PM, Don Peterson <donp@...1268...> wrote: