8

I'm running Windows 7, and using python version 2.7.

I've been trying to use pygraphviz, but whenever I use G.layout() on a graph, I get the error message;

Traceback (most recent call last):
  File "<pyshell#16>", line 1, in <module>
    G.layout()
  File "C:\Python27\lib\site-packages\pygraphviz\agraph.py", line 1305, in layout
    data=self._run_prog(prog,' '.join([args,"-T",fmt]))
  File "C:\Python27\lib\site-packages\pygraphviz\agraph.py", line 1251, in _run_prog
    runprog=r'"%s"'%self._get_prog(prog)
  File "C:\Python27\lib\site-packages\pygraphviz\agraph.py", line 1239, in _get_prog
    raise ValueError("Program %s not found in path."%prog)
ValueError: Program neato not found in path.

I know, however, that the Graphviz files are installed, and the directory is in my path (I've manually gone and added it).

I've tried the simlink solution given here but all I get when I enter that into the command line (administrator mode) is a message saying it is not recognized as an internal or external command, operable program, or batch file. I'm not experienced enough to know whether there's something I'm failing to do with that though.

Is there something I can do to make this work?

Tamara Koliada
  • 1,200
  • 2
  • 14
  • 31
meta
  • 829
  • 1
  • 10
  • 23

1 Answers1

3

I had the same problem with conda. Apparently there is something wrong with the libraries. This comment in here worked for me:

https://github.com/conda/conda/issues/1851#issuecomment-314924385

In the Anaconda prompt do both:

conda install -c anaconda graphviz

and

conda install -c anaconda python-graphviz

Then import graphviz will work.

BrokenBenchmark
  • 18,126
  • 7
  • 21
  • 33
  • Please include the actual instructions to address this problem in your answer. It's appropriate to cite the source as you have, but you should also include the fix (in your own words) in case that link stops working. – Craig Jun 24 '22 at 17:41