最新消息:20210917 已从crifan.com换到crifan.org

【已解决】Mac中安装Python的graphviz

Mac crifan 1267浏览 0评论
折腾:
【未解决】anytree中打印出Tree树的结构文字版和图片版
期间,去Mac中的Python中安装graphviz
先去看看:
python graphviz
python-graphviz图数据可视化入门 – DataSense (mlln.cn)
 pipenv install graphviz       
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead. You can set PIPENV_VERBOSITY=-1 to suppress this warning.
Installing graphviz...
Adding graphviz to Pipfile's [packages]...
✔ Installation Succeeded 
Pipfile.lock (bed629) out of date, updating to (049b6e)...
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
Building requirements...
Resolving dependencies...
✔ Success! 
Updated Pipfile.lock (049b6e)!
Installing dependencies from Pipfile.lock (049b6e)...
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/0 — 00:00:00
User Guide — graphviz 0.16 documentation
Graphviz | Graphviz
好像是需要安装Graphviz本身
上面安装的只是 python的binding=interface
Graphviz — graphviz 0.16 documentation
Download | Graphviz
Index of /Archive/stable (graphviz.org)
Index of /Archive/stable/macos (graphviz.org)
macOS Big Sur
Download | Graphviz
brew install graphviz
速度很慢
加上代理:
export ALL_PROXY=socks5://127.0.0.1:51837
再试
期间报错:
【已解决】Mac中brew install graphviz报错Error Not a directory dir_s_rmdir  /usr/local/Cellar/python3
即可。
【总结】
给Mac中的Python中安装graphviz:
  • Python中要安装graphviz(的binding=interface)
    • pip install graphviz
      • 或: pipenv install graphviz
  • Mac中要安装graphviz(库)
    • brew install graphviz
      • 注:如果速度慢,可以用代理加速
        • export ALL_PROXY=socks5://127.0.0.1:51837

转载请注明:在路上 » 【已解决】Mac中安装Python的graphviz

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
99 queries in 0.237 seconds, using 23.36MB memory