libgraphviz-dev?

I'm using OSX 10.6.8. I am trying to install NetworkX, which is supposed to be able to read dot files, manipulate the graph, and write out graphs to file (including in dot & other formats). NetworkX requires pygraphviz to handle dot files, which in turn requires Graphviz. I have Graphviz (2.34) installed, but pygraphviz still says:
2) Your Graphviz package might incomplete.
Install the binary development subpackage (e.g. libgraphviz-dev or similar.)

I don't know what "subpackage" they are talking about. Any suggestions?

For some systems, the

For some systems, the binaries are split into a basic package and a development package, which contains functions for those applications that use the software intensively. For example, if you go to http://www.graphviz.org/Download_linux_rhel.php, you'll see packages with "dev" or "devel" in the name. For OSX, you need to check where you got the package. I think the package we provide contains everything, but macports has both a graphviz and a graphviz-devel packages.

Well, I originally got

Well, I originally got Graphviz from the download section here, but couldn't find libgraphviz-dev anywhere on my system.  'port install py27-pygraphviz' installed graphviz-2.36 as a dependency.  And now when I try 'sudo port install graphviz-devel', it complains that:
Error: Unable to execute port: Can't install graphviz-devel because conflicting ports are installed: graphviz

Indeed, the graphviz and

Indeed, the graphviz and graphviz-devel ports conflict, so you need to uninstall one to install the other.

However, I have downloaded pygraphviz and think the answer is simpler. If you installed graphviz from here, by default the files are placed under /usr/local. The problem in the pygraphviz setup.py script is that it is trying pkg-config to find out where graphviz is, and is failing. One way to fix this is to set PKG_CONFIG_PATH=/usr/local/lib/pkgconfig, and then rerun python setup.py install. Or you can just edit the setup.py file and remove the comments  from the lines under OSX, Linus, alternate locations:

# OSX, Linux, alternate location
library_path='/usr/local/lib/graphviz'
include_path='/usr/local/include/graphviz'

If you want to use the macports version of graphviz, uncomment the two lines under # OSX (MacPorts).

These worked for me.