Please install Homebrew if you're running on OSX. You will need it to get pygraphviz to install correctly. pip install networkx numpy scipy matplotlib pyyaml brew ...