Thanks, Tiago. I do have gtk3 installed. What I did was install XQuartz instead, and it helped fix this particular issue-- allowing me to run that line (from graph_tool.all import *) without error.
However, this error appeared
gi._glib.GError: Couldn't recognize the image file format for file '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/graph_tool/draw/graph-tool-logo.svg'
Exception AttributeError: "'GraphWindow' object has no attribute 'graph'" in <bound method GraphWindow.__del__ of <GraphWindow object at 0x13348b690 (graph_tool+draw+gtk_draw+GraphWindow at 0x7fb15c82a320)>> ignored
when I ran this:
from graph_tool.all import *
g1 = Graph()
v1 = g1.add_vertex()
v2 = g1.add_vertex()
e = g1.add_edge(v1,v2)
graph_draw(g1, vertex_text = g1.vertex_index, vertex_font_size = 18)
I couldn't find any other solutions online.
Thanks again.
Best,
E
On Friday, April 18, 2014 3:21:10 PM UTC+8, Tiago Peixoto wrote:On 04/18/2014 06:26 AM, EFTL wrote:
> Hi, this is the first time I'm dabbling into graph-tool as I had always been using networkx. Anyway, I managed to successfully install the package via MacPorts.
>
> When I run: import graph_tool -- everything seems to be running okay.
>
> However, when I run: from graph_tool.all import *
>
> I am getting the following:
>
>
> ERROR:root:Could not find any typelib for Gtk
>
> ERROR:root:Could not find any typelib for Gdk
>
> ERROR:root:Could not find any typelib for GdkPixbuf
>
>
> Has anyone encountered this before? Were you able to resolve it?
These are just warnings, right? The module actually imports
successfully?
This is probably just because you don't have GTK+ 3 installed, which is
needed for interactive visualization. Just do:
port install gtk3
and everything should work.
Best,
Tiago
--
Tiago de Paula Peixoto <ti...@skewed.de>