Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pygraphviz Installation Failed with error code 1083 Cannot open file graphviz/cgraph.h: No such file or directory

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.

like image 657
P.D Avatar asked Oct 18 '22 09:10

P.D


1 Answers

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

like image 136
FBolduc Avatar answered Oct 21 '22 04:10

FBolduc