4

I have been using the graph-tool library for a while now, thus far I hadn't really been using most of its drawing features. Today when trying to use graph_tool.draw.graph_draw I realised that I had configured graph-tool initially without cairo,

./configure --disable-cairo

and this is exactly the graphics library that graph_draw uses. If I install cairo now, is there a way to activate the features of graph_tool that rely on cairo without having to remove and reinstall the whole graph_tool module? This would spare a few hours of re-installation. (the make process takes about 3 hours on my machine).

Ellie
  • 93
  • 7

1 Answers1

5

You have to recompile the library, since the cairo-based drawing is implemented in C++.

Tiago Peixoto
  • 5,149
  • 2
  • 28
  • 28
  • Alright, thanks, I'll redo the whole thing again asap. For python2.7, is py2cairo-1.10.0 [found here](http://cairographics.org/pycairo/), the one to install? – Ellie Sep 26 '15 at 10:59
  • Related question to this: Does the Py3 Debian stretch package come without cairo/graph visualization tools? `'graph_draw' in dir(graph_tool.all)` returns `False` for `graph_tool.__version__ '2.26 (commit b89e6b4e, Thu Nov 9 14:55:43 2017 +0000)'`. – kuanb Jan 11 '18 at 23:43
  • Yes it does. Maybe you are missing some run-time dependency. – Tiago Peixoto Jan 12 '18 at 14:11
  • Thanks. Looks like it's cairo: `RuntimeWarning: Error importing cairo. Graph drawing will not work.` Would it be correct to say that, for the Debian package installation, the graph drawing libraries (GTK+ 3, cairomm, pycairo and matplotlib) need to be installed in addition to python3-graph-tool? – kuanb Jan 12 '18 at 19:12