Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pygraphviz error: program neato not found in path

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?

like image 657
meta Avatar asked Feb 06 '14 14:02

meta


1 Answers

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.

like image 87
Milena Trentin Avatar answered Sep 30 '22 07:09

Milena Trentin