2

I've installed graphviz, following the command given here, to use it with Networkx

conda install -c alubbock pygraphviz

But there is a problem while trying to run the code given here

raise ValueError("Program %s not found in path." % prog)
ValueError: Program neato not found in path

I searched a bit and found Neato missing for 64 bit version.

Does this problem still exist? Is there a way to install Neato?

EDIT: Following the instructions given below, I have installed Graphviz in the following folder

C:\Program Files (x86)\Graphviz2.38

Could someone suggest how to proceed from here?

import pygraphviz as pgv

doesn't work.

So I tried,

pip install pygraphviz

returns

pygraphviz/graphviz_wrap.c(2987): fatal error C1083: Cannot open include file: 'graphviz/cgraph.h': No such file or directory
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
  ----------------------------------------
  ERROR: Failed building wheel for pygraphviz
  Running setup.py clean for pygraphviz
Failed to build pygraphviz
Installing collected packages: pygraphviz
    Running setup.py install for pygraphviz ... error

I'm not sure how to install pygraphviz now.

Natasha
  • 1,111
  • 5
  • 28
  • 66

1 Answers1

2

So the problem is that neato is missing.

As per your post seems like your system does not know where neato is. So add the directory where neato.exe is contained in to your PATH environment variable.

On Windows10, this can be done with Start -> Edit environment variables for your account -> select path in the window -> edit -> New -> C:\Program Files (x86)\Graphviz2.38\bin\

or whatever your install directory is.

Arpit Jain
  • 1,217
  • 8
  • 27
  • Thanks for the reposne. I don't find the bin folder. C:\xxx\xxx\Anaconda3\pkgs\graphviz-2.41-0\ contains include, info, Library, Scripts, share – Natasha Mar 09 '20 at 13:00
  • @Natasha Please download the stable version here it is the link:- https://graphviz.gitlab.io/_pages/Download/Download_windows.html Please just let me know if any confusion over there. – Arpit Jain Mar 09 '20 at 13:04
  • Thanks, could you please let me know how to uninstall graphviz installed using `conda install -c alubbock pygraphviz` – Natasha Mar 09 '20 at 13:05
  • 1
    If you are using windows then just go to Control panel and uninstall that program simple :) – Arpit Jain Mar 09 '20 at 13:07
  • Sorry, but I couldn't find in the control panel – Natasha Mar 09 '20 at 13:10
  • So please download the stable version and repair with the existing one if ask – Arpit Jain Mar 09 '20 at 13:11
  • I downloaded the stable version and installed and added the path in environment variables. But I am not sure how to import the package now. `import pygraphviz as pgv` says cannot find the package. I could find neato in bin now. – Natasha Mar 09 '20 at 14:11