2015-12-11 79 views
7

我正在嘗試做一些Networkx Graphviz圖。Ubuntu graphviz'sfdp'不能正常工作

運行後:pos = nx.graphviz_layout(G, prog = 'sfdp')。發生錯誤,他說:

Error: remove_overlap: Graphviz not built with triangulation library 

經過一番谷歌研究,我發現,GTS是問題。 Bug report說:

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

看着意見(對錯誤報告),有人說,的Graphviz上游資源保持在link,但我無法找到新的版本下載。

對包list我有最新的一個(2.36爲信任)。

其他人有問題sfdp

任何幫助將不勝感激!

+1

同樣的問題,沒有解決方案呢。 –

+0

@PaulSmith我放棄了一個很久以前:d – VlS

回答

1

可能有工作的Ubuntu 14.04,因人而異

直接從https://packages.debian.org/search?keywords=graphviz

  • graphviz_2.38.0-13_amd64.deb
  • libcgraph6_2.38.0-13_amd64下載以下graphviz的包。 deb
  • libgvc6_2.38.0-13_amd64.deb
  • libgvpr2_2.38.0-13_amd64.deb
  • libltdl7_2.4.6-0.1_amd64.deb
  • 蟒-pygraphviz_1.3.1-1_amd64.deb

我從拉伸(測試)組使用的版本2.38.0-13。 您將需要如果存在的話,除去32位libltdl7:

sudo apt-get remove libltdl7:i386 

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 

直接安裝包你可以期待相關性錯誤。我清除他們:

sudo apt-get install -f 

,然後重新安裝

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

錯誤不再appeares雖然我會硬推說該圖是更好。

+0

不工作.. :( – lizlalala

1

我知道這個問題是Ubuntu的,但如果有人有使用自制MACOS同樣的問題,對我下面的工作:

brew reinstall graphviz --with-gts 
4

對於Ubuntu的用戶來說,這是怎麼了我grapvhiz到16.04工作,從源代碼編譯的graphviz-2.40.1:

在第一步中,要安裝GTS需求,graphviz的查找的gts.pc file

running apt-file search gts.pc學我,我必須安裝 'libgts-dev的':

sudo apt install libgts-dev 

下一個化妝pkg配置意識到文件:

pkg-config --libs gts 

pkg-config --cflags gts 

運行配置的GTS庫鏈接:

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

SFDP不再拋出錯誤'錯誤:remove_overlap:Graphviz not built with三角測量庫」爲PKG配置我從this答案改性

命令行代碼。

+1

下載'的graphviz-2.40.1.tar.gz'從[這裏](http://www.graphviz.org/Download_source.php ),並通過你的程序運行,和它的作品 - 那種我可以使用一些命令('dot','fdp'),而不是其他('sfdp','neato')任何想法是怎麼回事(?使用Ubuntu 16.04.2) '' – JoeRocc

+0

在/ usr/bin中/ SFDP:沒有這樣的文件或directory'的問題,順便說一句而其他命令工作就像普通本帖](HTTPS://bugs.debian .org/cgi-bin/bugreport.cgi?bug = 853468)似乎與上述過程答案一致(1.安裝'libgts-dev',2.將'--with-gts'添加到配置中)。 ?有同樣的問題那裏我 – JoeRocc

+0

好吧,我得到它的工作(沒有問題呢,至少) - 爲別人誰也有類似的煩惱,我這裏寫了一些信息:https://github.com/ellson/gr aphviz/issues/1237雖然這可能只是我做錯了。謝謝,山姆! – JoeRocc