Ubuntu graphviz'sfdp'无法正常工作 [英] Ubuntu graphviz 'sfdp' not working

查看:259
本文介绍了Ubuntu graphviz'sfdp'无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试制作一些 Networkx Graphviz 图.

I'm trying to make some Networkx Graphviz graphs.

运行后:pos = nx.graphviz_layout(G, prog = 'sfdp').发生错误,说:

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

Error: remove_overlap: Graphviz not built with triangulation library

经过 Google 研究后,我发现GTS是问题所在. 错误报告表示:

After some Google research I found that GTS is the problem. Bug report stated:

Graphviz软件包是--without-gts构建的.这对于s​​fdp来说是个坏消息,它抱怨错误:remove_overlap:Graphviz未使用三角剖分库构建",并且在编译--with-gts时未能产生其创建的精美输出

The Graphviz package is built --without-gts. This is bad news for sfdp, which complains "Error: remove_overlap: Graphviz not built with triangulation library" and fails to produce the beautiful output it creates when compiled --with-gts

看着评论(关于bug报告),有人说 Graphviz 的上游资源保存在

Looking at comments ( on bug report ), someone said that the upstream sources for Graphviz are kept at link but I couldn't find new versions to download.

在软件包列表中,我有最新的(对于 trusty,为2.36 ).

On package list I have the latest one (2.36 for trusty).

还有其他人对sfdp有疑问吗?

Anyone else having problems with sfdp?

任何帮助将不胜感激!

推荐答案

对于ubuntu用户,这是我让grapvhiz在16.04上工作的方式,从源代码编译graphviz-2.40.1:

For the ubuntu users, this is how I got grapvhiz to work on 16.04,compiling graphviz-2.40.1 from source:

第一步,需要安装 GTS ,因为graphviz会查找 gts.pc文件.

In a first step , GTS needs to be installed , as graphviz looks for the gts.pc file.

运行

apt-file search gts.pc

通知我我必须安装'libgts-dev':

Informs me I have to install 'libgts-dev' :

sudo apt install libgts-dev

下一步使pkg-config识别文件:

next make pkg-config aware of the files:

pkg-config --libs gts

pkg-config --cflags gts

运行配置链接到gts库:

run configure to link in the gts library:

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

SFDP不再引发错误错误:remove_overlap:Graphviz不是用三角剖分库构建的"

SFDP no longer throws the error 'Error: remove_overlap: Graphviz not built with triangulation library'

我从 查看全文

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆