Python does not see pygraphviz

前端 未结 6 1459
执念已碎
执念已碎 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:20

    On Mac OSX El Capitan, Bart Theeten's solution works but there are two things you need to be careful. Initially, make sure that you installed graphviz on your computer. You can use homebrew:

    brew install graphviz
    

    Other thing is to make sure you add the path of packages to PYTHONPATH

    export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python2.7/site-packages/
    

提交回复
热议问题