问题
安装networkx时
pip install networkx[default,extra]
报以下错误
building 'pygraphviz._graphviz' extension
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/allenlee/Downloads/pygraphviz-master/pygraphviz -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c pygraphviz/graphviz_wrap.c -o build/temp.macosx-10.6-intel-2.7/pygraphviz/graphviz_wrap.o
pygraphviz/graphviz_wrap.c:2969:10: fatal error: 'graphviz/cgraph.h' file not found
#include "graphviz/cgraph.h"
^
解决
安装libgraphviz-dev
sudo apt-get install -y libgraphviz-dev
然后再安装一次