mac安装pygraphviz找不到头文件

安装error:

pygraphviz/graphviz_wrap.c:2711:10: fatal error: 'graphviz/cgraph.h' file not found

      #include "graphviz/cgraph.h"

               ^~~~~~~~~~~~~~~~~~~

      1 error generated.

      error: command '/usr/bin/clang' failed with exit code 1

      [end of output]

解决办法:

① brew install graphviz
② pip install --pre --global-option='build_ext' \
              --global-option="-I/usr/local/Cellar/graphviz/2.50.0/include" \
              --global-option="-L/usr/local/Cellar/graphviz/2.50.0/lib" \
              pygraphviz


版权声明:本文为WOSHICSDN7547原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。