interactive_window not defined

Hi,

I'm trying to plot a graph in an interactive window using the graph_draw
command with no output, and I get an error that says "interactive_window is
not defined". The same thing happens when I run from a notebook with the
kwarg inline=False.

I assume that this is an installation issue? I installed on a Mac via
Homebrew, roughly following the recommended tutorial, and I'm pretty sure I
have all the listed dependencies – boost, boost-python, cairo, cairomm,
py2cairo, graphviz and many others are all installed via Homebrew.

This problem is independent of MatPlotLib; in any case the backend is set to
MacOSX in my matplotlibrc file.

Please can you help me narrow it down?

The error trace is below.

Thanks!

Charlie

Do you have Gtk+ and gobject installed?

Best,
Tiago

Thank you very much for the reply Tiago.

Apparently I did not have GTK installed. I have now installed gtk+3 via
homebrew, and it has included several dependencies including
gobject-introspection.

Do I also need pygobject, or pygobject3?

And will I need to reinstall graph-tool (using make or make configure)?

Cheers,

Charlie

Thank you very much for the reply Tiago.

Apparently I did not have GTK installed. I have now installed gtk+3 via
homebrew, and it has included several dependencies including
gobject-introspection.

Do I also need pygobject, or pygobject3?

Yes, I think so.

And will I need to reinstall graph-tool (using make or make configure)?

No, this is not necessary.

Best,
Tiago

Thanks.

I have installed gtk+3 and pygobject , and have definite progress. Import
graph_tool now launches an X11 session, so that's promising. But the
command that should produce an interactive plot now gives a different error.
Traceback below.

Thank you very much for your ongoing help Tiago, you are a forum hero!

Best,

Charlie

I’ve just installed libsvg and libsvg-cairo but neither one removes the error.

Cheers,

Charlie

You need to install librsvg (not libsvg).

Best,
Tiago

I have that too but am still getting the same error :frowning:

Well, strange. This is probably a homebrew bug. Looking at

    https://github.com/Homebrew/homebrew/blob/master/Library/Formula/librsvg.rb

it looks like the version there is pretty old, and for some reason
introspection is not enabled.

I should report this problem to them.

Best,
Tiago

Ok, I’ll do that.

Thanks again for your efforts.

Cheers,

Charlie

Hi again Tiago!

I tried editing the Homebrew formula for librsvg to obtain the latest
version and enable introspection, and sure enough I can now produce an
interactive graph! Hooray! I've posted the issue on the Homebrew github
page that you referred.

BUT: now I have a different problem. In my beautiful interactive graphs,
the second node I select infallibly triggers a fatal error that kills the
kernel. Here it is:

/usr/local/lib/python2.7/site-packages/graph_tool/draw/gtk_draw.py:493:
Warning: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
  icon = self.render_icon(Gtk.STOCK_EXECUTE, Gtk.IconSize.BUTTON)

Well, this is obviously a Gtk bug, since it is failing to render a stock
icon. You should also report this to the homebrew people.

(Alternatively, you may try Macports, where it is reported to work)

Best,
Tiago

Thanks Tiago. Using the Macports install was the very first thing I tried, I’m rather committed to Homebrew through other packages. The two of them don’t play nicely together, and I ended up breaking a lot of other things. I might look into trying to get them to cooperate if I can’t get a fix for GTK.

Cheers,

Charlie

attachment.html (15.5 KB)