0

Yes, I know a discussion is here: Issues installing pygrahviz "fatal error C1083: Cannot open include file: 'graphviz/cgraph.h': No such file or directory"

But none of these solutions worked.

I used:

pip install graphviz

and also:

pip install --global-option=build_ext --global-option="-IC:\Program Files\Graphviz\include" --global-option="-LC:\Program Files\Graphviz\lib" pygraphviz

But neither of these have worked still returning:

pygraphviz/graphviz_wrap.c(3020): fatal error C1083: Cannot open include file: 'graphviz/cgraph.h': No such file or directory error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.36.32532\\bin\\HostX86\\x64\\cl.exe' failed with exit code

Also there is this warning in the command prompt but i don't know how to utilise it.

DEPRECATION: --build-option and --global-option are deprecated. pip 23.3 will enforce this behaviour change. A possible replacement is to use --config-settings. Discussion can be found at https://github.com/pypa/pip/issues/11859 WARNING: Implying --no-binary=:all: due to the presence of --build-option / --global-option.

Tang0
  • 5
  • 4

1 Answers1

0

pip install graphviz installs a python interface to the Graphviz software system, but not the Graphviz software itself. https://pypi.org/project/graphviz/ says:

To render the generated DOT source code, you also need to install Graphviz

Go here to get the Graphviz download: https://graphviz.org/download/

sroush
  • 5,375
  • 2
  • 5
  • 11
  • I already installed graphviz but i'll try it again, is there a specific version I should get? – Tang0 Jul 10 '23 at 17:00
  • start **cmd** & type **dot -V** If you get a response with the release version, that is not the problem. – sroush Jul 10 '23 at 17:21
  • Right t i got a version, any ideas what the issue could be? – Tang0 Jul 10 '23 at 17:58
  • 1. does **C:\Program Files\Graphviz\include** exist and is it populated with good files? 2. I wonder about the forward slash in `'graphviz/cgraph.h'` – sroush Jul 11 '23 at 03:51
  • It does infact exist and i can see the `cgraph.h` file as well :/ , I don't think the "/" should matter though – Tang0 Jul 11 '23 at 15:41