Mac下安装最新版本的Graphviz

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Mac下安装最新版本的Graphviz
由于版本兼容问题,Mac下Graphviz之前⼀直装的是低版本的2.36。

⾼版本的安装⽅法如下:
1、log in & download Xcode an Xcode Command Line Tools from
install Xcode and the Xcode Command Line Tools
2、agree to Xcode license in terminal:
sudo xcodebuild –license
3、get MacPorts pkg installer for your version of osx from
install MacPorts for your version of osx
4、in terminal:
sudo port -v selfupdate
5、install graphviz via MacPorts. in terminal:
sudo port install graphviz-gui
installed gui application can be found here: /Application/Macports/Graphviz.app
相关MacPorts的命令说明可以看:
我这⾥由于有之前的版本的 graphviz,安装时候提⽰:
$ sudo port install graphviz-gui
---> Computing dependencies for graphviz-gui
---> Cleaning graphviz-gui
---> Scanning binaries for linking errors
Warning: Error parsing file /Applications/MacPorts/Graphviz.app/Contents/MacOS/Graphviz: Error opening or reading file ---> No broken files found.
解决⽅法:
先⽤ AppCleaner 清除之前的安装⽂件。

再⽤ sudo port uninstall graphviz-gui 卸载之前的安装依赖。

然后重新安装就可以安装成功了 2.40.1。

另外在做安装时,提⽰我要设置⼀些默认python 。

执⾏下⾯任何⼀个命令都可以完成。

---> Some of the ports you installed have notes:
python27 has the following notes:
To make this the default Python or Python 2 (i.e., the version run by the
'python' or 'python2' commands), run one or both of:
sudo port select --set python python27
sudo port select --set python2 python27
##############################################################
# IF YOU ARE USING PYTHON FROM THE TERMINAL, PLEASE INSTALL:
# py27-readline
# TO AVOID A LIBEDIT / PYTHON INTERACTION ISSUE.
# REF:
##############################################################
这种⽅式安装完成后, GUI和命令⾏都是升级到了 2.40.1 版本了。

$ dot -V
dot - graphviz version 2.40.1 (20161225.0304)
参考:
这⾥的评论部分。

相关文档
最新文档