title: PyGraphviz is just not getting installed in OS-X 10.9.4
body: <p>Note: This problem is not covered in any of these posts: <a href="https://stackoverflow.com/questions/17132364/installing-pygraphviz-on-os-x-10-7-5">1</a>, <a href="https://stackoverflow.com/questions/32933480/error-while-installing-pygraphviz-mac-os-x-anaconda">2</a>, <a href="https://stackoverflow.com/questions/35643236/how-do-i-install-pygraphviz-with-pip">3</a>.</p>
  
  <p>The aim is to get PyGraphviz installed to work with visualualization tools provided by <code>python-weka-wrapper</code>. I just couldn't install PyGraphviz. The following is the error I get when trying from <code>pip</code></p>
  
  <pre><code>$ sudo pip install git+git://github.com/pygraphviz/pygraphviz.git
  Password:
  The directory '/Users/Ebe/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
  The directory '/Users/Ebe/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
  Collecting git+git://github.com/pygraphviz/pygraphviz.git
    Cloning git://github.com/pygraphviz/pygraphviz.git to /tmp/pip-rMp2aK-build
  Installing collected packages: pygraphviz
    Running setup.py install for pygraphviz ... error
      Complete output from command /opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u -c "import setuptools, tokenize;__file__='/tmp/pip-rMp2aK-build/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-CrnqPI-record/install-record.txt --single-version-externally-managed --compile:
      /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/dist.py:282: UserWarning: Normalizing '1.4.dev' to '1.4.dev0'
        normalized_version,
      running install
      Trying pkg-config
      include_dirs=/opt/local/include/graphviz
      library_dirs=/opt/local/lib
      running build
      running build_py
      creating build
      creating build/lib.macosx-10.9-x86_64-2.7
      creating build/lib.macosx-10.9-x86_64-2.7/pygraphviz
      copying pygraphviz/__init__.py -&gt; build/lib.macosx-10.9-x86_64-2.7/pygraphviz
      copying pygraphviz/agraph.py -&gt; build/lib.macosx-10.9-x86_64-2.7/pygraphviz
      copying pygraphviz/graphviz.py -&gt; build/lib.macosx-10.9-x86_64-2.7/pygraphviz
      copying pygraphviz/release.py -&gt; build/lib.macosx-10.9-x86_64-2.7/pygraphviz
      copying pygraphviz/version.py -&gt; build/lib.macosx-10.9-x86_64-2.7/pygraphviz
      creating build/lib.macosx-10.9-x86_64-2.7/pygraphviz/tests
      copying pygraphviz/tests/__init__.py -&gt; build/lib.macosx-10.9-x86_64-2.7/pygraphviz/tests
      copying pygraphviz/tests/test.py -&gt; build/lib.macosx-10.9-x86_64-2.7/pygraphviz/tests
      copying pygraphviz/tests/test_attribute_defaults.py -&gt; build/lib.macosx-10.9-x86_64-2.7/pygraphviz/tests
      copying pygraphviz/tests/test_attributes.py -&gt; build/lib.macosx-10.9-x86_64-2.7/pygraphviz/tests
      copying pygraphviz/tests/test_clear.py -&gt; build/lib.macosx-10.9-x86_64-2.7/pygraphviz/tests
      copying pygraphviz/tests/test_drawing.py -&gt; build/lib.macosx-10.9-x86_64-2.7/pygraphviz/tests
      copying pygraphviz/tests/test_edge_attributes.py -&gt; build/lib.macosx-10.9-x86_64-2.7/pygraphviz/tests
      copying pygraphviz/tests/test_graph.py -&gt; build/lib.macosx-10.9-x86_64-2.7/pygraphviz/tests
      copying pygraphviz/tests/test_html.py -&gt; build/lib.macosx-10.9-x86_64-2.7/pygraphviz/tests
      copying pygraphviz/tests/test_layout.py -&gt; build/lib.macosx-10.9-x86_64-2.7/pygraphviz/tests
      copying pygraphviz/tests/test_node_attributes.py -&gt; build/lib.macosx-10.9-x86_64-2.7/pygraphviz/tests
      copying pygraphviz/tests/test_readwrite.py -&gt; build/lib.macosx-10.9-x86_64-2.7/pygraphviz/tests
      copying pygraphviz/tests/test_string.py -&gt; build/lib.macosx-10.9-x86_64-2.7/pygraphviz/tests
      copying pygraphviz/tests/test_subgraph.py -&gt; build/lib.macosx-10.9-x86_64-2.7/pygraphviz/tests
      copying pygraphviz/tests/test_unicode.py -&gt; build/lib.macosx-10.9-x86_64-2.7/pygraphviz/tests
      running egg_info
      creating pygraphviz.egg-info
      writing pygraphviz.egg-info/PKG-INFO
      writing top-level names to pygraphviz.egg-info/top_level.txt
      writing dependency_links to pygraphviz.egg-info/dependency_links.txt
      writing manifest file 'pygraphviz.egg-info/SOURCES.txt'
      warning: manifest_maker: standard file '-c' not found
  
      reading manifest file 'pygraphviz.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no previously-included files matching '*~' found anywhere in distribution
      warning: no previously-included files matching '*.pyc' found anywhere in distribution
      warning: no previously-included files matching '.svn' found anywhere in distribution
      no previously-included directories found matching 'doc/build'
      writing manifest file 'pygraphviz.egg-info/SOURCES.txt'
      copying pygraphviz/graphviz.i -&gt; build/lib.macosx-10.9-x86_64-2.7/pygraphviz
      copying pygraphviz/graphviz_wrap.c -&gt; build/lib.macosx-10.9-x86_64-2.7/pygraphviz
      running build_ext
      building 'pygraphviz._graphviz' extension
      creating build/temp.macosx-10.9-x86_64-2.7
      creating build/temp.macosx-10.9-x86_64-2.7/pygraphviz
      /usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -pipe -Os -fwrapv -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/opt/local/include/graphviz -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c pygraphviz/graphviz_wrap.c -o build/temp.macosx-10.9-x86_64-2.7/pygraphviz/graphviz_wrap.o
      pygraphviz/graphviz_wrap.c:2987:10: fatal error: 'graphviz/cgraph.h' file not found
      #include "graphviz/cgraph.h"
               ^
      1 error generated.
      error: command '/usr/bin/clang' failed with exit status 1
  
      ----------------------------------------
  Command "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u -c "import setuptools, tokenize;__file__='/tmp/pip-rMp2aK-build/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-CrnqPI-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-rMp2aK-build/
  </code></pre>
  
  <p>Graphviz was installed with the help of MacPorts. It's path is clear in the above result</p>
  
  <pre><code>include_dirs=/opt/local/include/graphviz
  library_dirs=/opt/local/lib
  </code></pre>
  
  <p>The <code>graphviz/cgraph.h</code> is also present. So what's going wrong with the installation.</p>
  
  <p>I tried everything in the net, but nothing seems to work. Here is a full list of what I tried.</p>
  
  <ul>
  <li><p>Installing from git:</p>
  
  <p><code>sudo pip install git+git://github.com/pygraphviz/pygraphviz.git</code></p></li>
  <li><p>Installing from setup.py from package source:</p>
  
  <p><code>sudo python setup.py install</code></p></li>
  <li><p>Installing with include and library paths along win command line:</p>
  
  <p><code>sudo python setup.py install --include-path=/opt/local/include/graphviz --library-path=/opt/local/lib/graphviz</code></p></li>
  </ul>
  
  <p>Each one of them throws the same error.</p>
  
  <p>What should I do?</p>