5

While trying to install pygraphviz 1.3 with pip the below error msg is coming

Fatal error 1083 Cannot open file graphviz/cgraph.h: No such file or directory error: command C:\Users\Appdata\Local\Programs\Common\Microsoft\Visual C++ for python\9.0\VC\Bin\cl.exe failed with status 2

I already have Microsoft Visual C++. I am using Python27. Pip is working fine and I have successfully installed graphviz-2.38. I have also tried with this command:

pip install --install-option="--include-path=\C:\graphviz-2.38\release\include\graphviz" --install-option="--library-path=\C:\graphviz-2.38\release\lib\graphviz" pygraphviz

Please let me know how to solve the problem.

P.D
  • 51
  • 1
  • 3

2 Answers2

3

Using Graphviz-2.38 default installation path, I've been able to install pygraphviz-1.3.1 using this command:

pip install --global-option=build_ext --global-option="-IC:\Program Files (x86)\Graphviz2.38\include" --global-option="-LC:\Program Files (x86)\Graphviz2.38\lib\release\lib" pygraphviz

FBolduc
  • 33
  • 5
0

I installed the latest graphviz using the latest win64 executable from graphviz.org

graphviz 2.49 win64

and the following command worked for me

pip install --global-option=build_ext --global-option="-IC:\Program Files\Graphviz\include" --global-option="-LC:\Program Files\Graphviz\lib" pygraphviz
codeslord
  • 2,172
  • 14
  • 20