Ubuntu graphviz 'sfdp' not working

I am trying to make Networkx Graphviz graphics.

After launch: pos = nx.graphviz_layout(G, prog = 'sfdp') . An error occurred saying:

 Error: remove_overlap: Graphviz not built with triangulation library 

After some research by Google, I found that the GTS problem is a problem. Report an error :

Graphviz package is built - without restrictions. This is bad news for sfdp, which complains about "Error: remove_overlap: Graphviz is not built using the triangulation library" and does not produce the beautiful output that it creates when compiling --with-gts

Looking at the comments (in the bug report), someone said that the source sources for Graphviz are stored in a link , but I could not find new versions for download.

In the package list I have the latter (2.36 for reliable).

Anyone else have problems with sfdp ?

Any help would be greatly appreciated!

+7
ubuntu package graphviz updates
source share
3 answers

For ubuntu users, here is how I got grapvhiz to work with 04.16, compiling graphviz-2.40.1 from the source:

The first step is to install GTS , as graphviz is looking for the gts.pc file .

running apt-file search gts.pc finds out that I need to install "libgts-dev":

 sudo apt install libgts-dev 

next make pkg-config knows the files:

 pkg-config --libs gts pkg-config --cflags gts 

run configure to link in the gts library:

 ./configure --with-gts --prefix ~ make make install 

SFDP no longer throws the error "Error: remove_overlap: Graphviz is not built with a triangulation library"

Command line codes for the pkg configuration I modified from this .

+4
source share

Maybe it works for Ubuntu 14.04, YMMV

Download the following graphviz packages directly from https://packages.debian.org/search?keywords=graphviz

  • graphviz_2.38.0-13_amd64.deb
  • libcgraph6_2.38.0-13_amd64.deb
  • libgvc6_2.38.0-13_amd64.deb
  • libgvpr2_2.38.0-13_amd64.deb
  • libltdl7_2.4.6-0.1_amd64.deb
  • python-pygraphviz_1.3.1-1_amd64.deb

I used version 2.38.0-13 from the stretching (testing) group. You will need to remove the 32-bit libltdl7, if any:

 sudo apt-get remove libltdl7:i386 

Install packages directly using

 sudo dpkg -i graphviz_2.38.0-13_amd64.deb sudo dpkg -i libcgraph6_2.38.0-13_amd64.deb libgvc6_2.38.0-13_amd64.deb libgvpr2_2.38.0-13_amd64.deb libltdl7_2.4.6-0.1_amd64.deb 

You can expect dependency errors. I cleaned them:

 sudo apt-get install -f 

And then reinstall

 sudo dpkg -i graphviz_2.38.0-13_amd64.deb sudo dpkg -i python-pygraphviz_1.3.1-1_amd64.deb 

The error no longer appears, although it will be difficult for me to say that the graphics are better.

+1
source share

I know the question is about Ubuntu, but in case someone has the same issue on macOS using homebrew, this worked for me:

 brew reinstall graphviz --with-gts 
+1
source share

All Articles