-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installation:fatal error: 'graphviz/cgraph.h' file not found #40
Comments
The same for Windows 7 (x64), Python 2.7.8 / Pip 1.2.1 and MS Visual C++ Compiler for Python. Installation both with "pip install pygraphvis" and with "pip install git://github.com/pygraphviz/pygraphviz.git#egg=pygraphviz" fails, pointing to the same missing graphviz/cgraph.h.
|
likely you need to set: on 38-39 lines in setup.py. In past, the default paths taken from pkg-config contained doubled .../graphviz |
Same missing header file on Windows 7 under Anaconda
conda-build version : 1.11.0 |
This should be resolved (or fixable by setting paths) with #52 |
Aric, On 21 May 2015 at 16:10, Aric Hagberg notifications@github.com wrote:
|
You'll need to get a full install of graphviz with the header sources if On Thu, May 21, 2015 at 9:49 AM, Graham Wood notifications@github.com
|
cgraph.h is part of graphviz (see graphviz.org). On Thu, May 21, 2015 at 10:00 AM, Graham Wood notifications@github.com
|
For the next Mac user with this problem. I have this setup...
... and also found some pain installing pygraphviz:
The fix that worked for me for was to:
This seems to have installed correctly. Hope this helps! A windows user made a similar note at http://stackoverflow.com/a/30275088/1165112 |
First point to note is don't rely on Windows Start "Search programs and files" to verify if the include or library files are present - on my system it did not check the program files subdirectories which is where the files were all the time. After a standard windows install of Graphviz the lib files are here
so in Pygraphviz edit the setup.py file to add these locations as the directories # Windows
# Unknown - use command line -I and -L switches to set
library_dirs='C:/Program Files (x86)/Graphviz2.38/lib/release/lib'
include_dirs='C:/Program Files (x86)/Graphviz2.38/include' or use the switches as suggested in addition to the install line below |
Hmm... I'm puzzled. Is this issue closed or open? I've just attempted to install pygraphviz 1.3.1 for Python 3.5.1 on 64bit Windows 7 using pip:
but it didn't end well...
Is the setup supposed to work now, or the workarounds mentioned above are still necessary? Does MSVC look for the headers only in directories mentioned in the command? I cannot see any graphviz-related path in compiler command executed by setup.py, so it's as if pygraphviz doesn't attempt to look for it. I ask because I have Graphviz installed in a custom directory. I'd like to avoid cloning the repo and rolling out my custom build just for this. By any chance, is there some command-line option to add custom include path? Like this:
|
I partially figured it out. I can almost install using below command:
These flags resolve the missing graphviz files issues, but the end result is 50 "unresolved external symbol" errors:
|
Ok... The final issue seems to be with the fact that I'm using 64bit Python, exactly like in another issue: #58 Sorry for a little bit of spamming above. I'll leave those logs here in case anyone else runs into this issue. |
@mbdevpl Did you ever resolve this? I have run into the same error messages (with LNK1120 etc.) you list above. |
@ColinWilder Unfortunately no - in the meantime my Windows dev machine died, and I don't miss it ;) But it seems like there is some more recent progress in #58, you might wanna try one of these approaches. |
@mbdevpl Are you referring to the comment there about new work by the graphviz people? Saw that. Hope it materializes. Thanks! |
@ColinWilder Unless I completely misunderstood what's written there, it has materialized already... Unless you're waiting for official binary release? In such case, please note that you might wait forever, because on http://www.graphviz.org/ it says that:
|
has any one found a solution for this problem...? |
You guys should mention this package is currently incompatible with Windows and 64-bit Python3 on the front page. Apparently nobody has found a fix despite all these issues being closed. This indicates support for windows is just being dropped. |
https://developercommunity.visualstudio.com/content/problem/409173/error-microsoft-visual-c-140-is-required.html |
for linux mint users, you need to install Correction: in order to use |
I think a lot of people still face some issues with pygraphviz setup on windows... so I wanted to share the exact issue i faced and the fix. Issue I faced: Root cause: Fix: pip install --global-option=build_ext --global-option="-I(insert the path to your include dir)" --global-option="-L(insert the path to your lib dir)" pygraphviz example... |
@rameshiyerv Thank you! It works:) |
I use Windoews 7 OS
and python 3.4.2
I run the code:
python setup.py install
But it cause the error:
D:\pygraphviz-master>python setup.py install
library_dirs=None
include_dirs=None
running install
running bdist_egg
running egg_info
writing top-level names to pygraphviz.egg-info\top_level.txt
writing dependency_links to pygraphviz.egg-info\dependency_links.txt
writing pygraphviz.egg-info\PKG-INFO
reading manifest file 'pygraphviz.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '~' found anywhere in distributi
on
warning: no previously-included files matching '.pyc' found anywhere in distrib
ution
warning: no previously-included files matching '.svn' found anywhere in distribu
tion
no previously-included directories found matching 'doc\build'
writing manifest file 'pygraphviz.egg-info\SOURCES.txt'
installing library code to build\bdist.win32\egg
running install_lib
running build_py
running build_ext
building 'pygraphviz._graphviz' extension
D:\mingw-get\bin\gcc.exe -mdll -O -Wall -DGVDLL -ID:\Python34\include -ID:\Pytho
n34\include -c pygraphviz/graphviz_wrap.c -o build\temp.win32-3.4\Release\pygrap
hviz\graphviz_wrap.o
pygraphviz/graphviz_wrap.c:2954:29: fatal error: graphviz/cgraph.h: No such file
or directory
#include "graphviz/cgraph.h"
^
compilation terminated.
error: command 'D:\mingw-get\bin\gcc.exe' failed with exit status 1
The text was updated successfully, but these errors were encountered: