Python does not see pygraphviz

前端 未结 6 1455
执念已碎
执念已碎 2020-12-04 21:52

I have installed pygraphviz using easy_install But when i launch python i have an error:

>>>import pygraphviz as pgv
Traceback (most recent call las         


        
6条回答
  •  鱼传尺愫
    2020-12-04 22:34

    On Mac OSX, the following did the trick for me:

    pip install graphviz
    pip install cgraph
    export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig 
    cd /usr/local/include/graphviz 
    sudo ln -s . graphviz 
    pip install pygraphviz
    

    [As suggested, fixed typo from previously /urs/local/ to /usr/local/]

提交回复
热议问题