title: Python: Installation issues with pygraphviz and graphviz
body: <p>I see many questions on the difficulties of properly installing <code>pygraphviz</code> and <code>graphviz</code> on Windows for Python 2.7. But no answers that I have found is solving my problem. Here's what I did:</p>
  
  <ul>
  <li>I first installed pygraphviz using unofficial windows binaries
  with this <a href="http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygraphviz" rel="noreferrer">link</a> in my anaconda (python) folder (
  <code>C:\Users\chamar\AppData\Local\Continuum\Anaconda</code> )</li>
  <li>Downloaded graphviz-2.36.msi and installed it under the default
  path <code>C:\Program Files (x86)\Graphviz2.36</code></li>
  </ul>
  
  <p>The command <code>import pygraphviz</code> in Python works. But when I want to use say this function <code>nx.graphviz_layout</code> I get <code>raise ValueError("Program %s not found in path."%prog)</code></p>
  
  <p>What may cause this problem is that <code>pygraphviz</code> cannot locate the path of <code>graphviz</code>. Now, since I installed <code>pygraphviz</code> using the unofficial windows binary, which file can I modify to link both the <code>library</code> and <code>include</code> for <code>graphviz</code>'s path? You would you usually find in the <code>setup.py</code> of <code>pygraphviz</code> the <code>library</code> and <code>include</code> paths when you don't use the unofficial binaries.</p>
  
  <p>UPDATE 1</p>
  
  <p>I added to <code>PATH</code> in <code>Regedit</code> under <code>SOFTWARE</code> a folder GRAPHIZ with a new <code>key</code> (default) with value <code>C:\Program Files (x86)\Graphviz2.36\bin</code></p>
  
  <p>UPDATE 2</p>
  
  <p>I was having an error in the <code>pydot.py</code> file regarding the difficulty of Python locating the path of Graphviz. I made the changes as follow:</p>
  
  <pre><code>def _graphviz():
      if os.sys.platform == 'win32':
          path = r"C:/Program Files (x86)/Graphviz2.36/bin/"
          progs = __find_executables(path)
          return progs
  
  find_graphviz()
  {'fdp': 'C:/Program Files (x86)/Graphviz2.36/bin/fdp.exe', 'twopi': 'C:/Program Files (x86)/Graphviz2.36/bin/twopi.exe', 'neato': 'C:/Program Files (x86)/Graphviz2.36/bin/neato.exe', 'dot': 'C:/Program Files (x86)/Graphviz2.36/bin/dot.exe', 'circo': 'C:/Program Files (x86)/Graphviz2.36/bin/circo.exe'}
  </code></pre>
  
  <p>That seems ok with me but when I execute say: </p>
  
  <pre><code>positions = nx.graphviz_layout(G, prog='twopi', root=0)
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>    Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "C:\Users\chamar.stu\AppData\Local\Continuum\Anaconda\lib\site-packages\networkx\drawing\nx_agraph.py", line 229, in graphviz_layout
      return pygraphviz_layout(G,prog=prog,root=root,args=args)
    File "C:\Users\chamar.stu\AppData\Local\Continuum\Anaconda\lib\site-packages\networkx\drawing\nx_agraph.py", line 264, in pygraphviz_layout
      A.layout(prog=prog,args=args)
    File "C:\Users\chamar.stu\AppData\Local\Continuum\Anaconda\lib\site-packages\pygraphviz\agraph.py", line 1305, in layout
      data=self._run_prog(prog,' '.join([args,"-T",fmt]))
    File "C:\Users\chamar.stu\AppData\Local\Continuum\Anaconda\lib\site-packages\pygraphviz\agraph.py", line 1251, in _run_prog
      runprog=r'"%s"'%self._get_prog(prog)
    File "C:\Users\chamar.stu\AppData\Local\Continuum\Anaconda\lib\site-packages\pygraphviz\agraph.py", line 1239, in _get_prog
      raise ValueError("Program %s not found in path."%prog)
  ValueError: Program twopi not found in path.
  </code></pre>
  
  <p>Why?</p>