1. 程式人生 > >解決Mac上安裝graphviz並在jupyter notebook上使用報錯

解決Mac上安裝graphviz並在jupyter notebook上使用報錯

報錯資訊:

ExecutableNotFound: failed to execute ['dot', '-Tsvg'], make sure the Graphv

執行環境為macOS High Sierra10.13.6 + python3.5

解決辦法:

  1. 首先,僅使用pip3 install graphviz是不行的,會產生如上的報錯資訊。

  2. 檢視graphviz包,發現全是.py檔案,並沒有.exe,推斷可能需要再安裝一些東西。 直接用homebrew安裝,執行 brew。

  3. install graphviz即可,不需要配置路徑資訊。grphviz包存放在usr/local/Celler中。

參考文章:

mac下的Graphviz安裝及使用
https://blog.csdn.net/qq_36847641/article/details/78224910