折腾:
【未解决】anytree中打印出Tree树的结构文字版和图片版
期间,去Mac中的Python中安装graphviz
先去看看:
python graphviz
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | 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]...
Pipfile.lock (bed629) out of date, updating to (049b6e)... Locking [dev-packages] dependencies... Locking [packages] dependencies... Building requirements... Resolving dependencies...
Updated Pipfile.lock (049b6e)! Installing dependencies from Pipfile.lock (049b6e)...
|
好像是需要安装Graphviz本身
上面安装的只是 python的binding=interface

macOS Big Sur
1 | brew install graphviz |
速度很慢
加上代理:
1 | 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