error: not able to draw vertex index
HI I am new to graph tools, and I have installed graph tools in anaconda environment on my PC(CentOS 7) and tried to run the following example code: *>>>from graph_tool.all import *>>>g = Graph()>>>v1 = g.add_vertex()>>>v2 = g.add_vertex()>>>e = g.add_edge(v1, v2)>>>graph_tool.draw.graph_draw(g, **vertex_text=g.vertex_index, vertex_font_size=18,output_size=(200, 200), output="two-nodes.png")* and I get his error /home/maddy/anaconda2/bin/python: symbol lookup error: /home/maddy/anaconda2/lib/python2.7/site-packages/graph_tool/draw/libgraph_tool_draw.so: undefined symbol: _ZN5Cairo7Context16select_font_faceERKSsNS_9FontSlantENS_10FontWeightE however i don't get the error if i don't use: *vertex_text=g.vertex_index in graph_draw* and the code successfully gives expected graph except for vertex_index Work-around: Although I found from the forums that It could be due to LD_LIBRARY_PATH and I have set the path in ~/.bashrc: *export LD_LIBRARY_PATH:"/home/maddy/anaconda2/lib:$LD_LIBRARY_PATH"* Could you you help me fix the issue as I am in dire need to generate the graphs for academic purposes and deadlines are just around. Thank you for the patience Madhav
Am 27.10.18 um 02:55 schrieb Madhav Vinodh Pithapuram:
HI I am new to graph tools, and I have installed graph tools in anaconda environment on my PC(CentOS 7) and tried to run the following example code:
*/>>>from graph_tool.all import *
g = Graph() v1 = g.add_vertex() v2 = g.add_vertex() e = g.add_edge(v1, v2) graph_tool.draw.graph_draw(g, /**//*vertex_text=g.vertex_index,*/ vertex_font_size=18,output_size=(200, 200), output="two-nodes.png")/*
and I get his error
/home/maddy/anaconda2/bin/python: symbol lookup error: /home/maddy/anaconda2/lib/python2.7/site-packages/graph_tool/draw/libgraph_tool_draw.so: undefined symbol: _ZN5Cairo7Context16select_font_faceERKSsNS_9FontSlantENS_10FontWeightE
however i don't get the error if i don't use: /*vertex_text=g.vertex_index *in *graph_draw */ and the code successfully gives expected graph except for vertex_index **/**/
Work-around: Although I found from the forums that It could be due to LD_LIBRARY_PATH and I have set the path in ~/.bashrc: ** *export LD_LIBRARY_PATH:"/home/maddy/anaconda2/lib:$LD_LIBRARY_PATH"
* Could you you help me fix the issue as I am in dire need to generate the graphs for academic purposes and deadlines are just around.
Thank you for the patience
This issue seems to be related to path inconsistencies in the conda package you use. Note that these packages are not "official", and are not done by me. Please contact the author of the packages so they can fix the problem. -- Tiago de Paula Peixoto <tiago@skewed.de>
participants (2)
-
Madhav Vinodh Pithapuram -
Tiago de Paula Peixoto