简体   繁体   中英

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.

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM