1. 引言
Graphviz 是一个开源绘图工具,很多软件都基于graphviz,例如:torchviz中的动态计算图绘制就依赖它。缺少graphviz时执行make_dot函数会报如下错误:
graphviz.backend.ExecutableNotFound: failed to execute ['dot', '-Tpdf', '-O', 'Digraph.gv'], make sure the Graphviz executables are on your systems' PATH
2. 通过homebrew安装
关于mac下如何安装graphviz,网上很多教程都是用homebrew包管理器来安装:
brew install graphviz
但实际执行时,却会遇到关于SSL、mac版本的各种环境问题,尝试多次均无法成功。
Running `brew update --auto-update`...
Error: Failed to download https://formulae.brew.sh/api/formula.jws.json!
==> Downloading https://formulae.brew.sh/api/formula.jws.json
### 1.8%
curl: (28) Operation too slow. Less than 100 bytes/sec transferred the last 5 seconds
Warning: formula.jws.json: update failed, falling back to cached version.
==> Downloading https://formulae.brew.sh/api/formula.jws.json
curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to formulae.brew.sh:443
Error: Failure while executing; `/usr/bin/env /usr/local/Homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --user-agent Homebrew/4.1.19\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 11.6.7\)\ curl/7.64.1 --header Accept-Language:\ en --fail --progress-bar --remote-time --output /Users/a200007/Library/Caches/Homebrew/api/formula.jws.json --location --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/4.1.19\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 11.6.7\)\ curl/7.64.1 --header Accept-Language:\ en --fail --progress-bar --compressed --speed-limit 100 --speed-time 5 https://formulae.brew.sh/api/formula.jws.json` exited with


1026

被折叠的 条评论
为什么被折叠?



