graphviz 无法在python3.4+中无法安装,
- Install MSFT C++ compiler.
- Install Anaconda for Win AMD64, Python3.
- Install graphviz for Win.
- Add
C:\Program Files (x86)\Graphviz2.38\bin
to your PATH environment variable. - Download pygraphviz-1.3.1-cp34-none-win_amd64.whl.
- Create a Conda environment with Python version 3.4:
conda create --name digraphs python=3.4 anaconda
. - Enter the environment:
activate digraphs
. - Install pygraphviz using pip:
pip install pygraphviz-1.3.1-cp34-none-win_amd64.whl
. - Run example:
python ./gviz_simple.py
. - Exit the environment:
deactivate
1. 设置环境变量 在用户环境变量添加以下一个变量
.建立变量名 GRAPHVIZ_INSTALL_DIR, 值为如C:\Program Files (x86)\Graphviz2.34
2 在系统环境变量 建立变量名PATH中添加Graphviz的bin目录路径,如C:\Program Files (x86)\Graphviz2.34\bin
3.在终端中使用命令 pip install graphviz (一定要切换到digraphs 环境下)