Installation error in Ubuntu

2,006 views
Skip to first unread message

Amy Koid

unread,
Mar 6, 2013, 2:26:58 PM3/6/13
to pygraphvi...@googlegroups.com
Hi there,

I get this error message when I try to install pygraphviz.

python setup.py install
library_path=/usr/lib/graphviz
include_path=/usr/include/boost/graph/graphviz
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/pygraphviz
copying pygraphviz/agraph.py -> build/lib.linux-x86_64-2.7/pygraphviz
copying pygraphviz/release.py -> build/lib.linux-x86_64-2.7/pygraphviz
copying pygraphviz/graphviz.py -> build/lib.linux-x86_64-2.7/pygraphviz
copying pygraphviz/__init__.py -> build/lib.linux-x86_64-2.7/pygraphviz
copying pygraphviz/version.py -> build/lib.linux-x86_64-2.7/pygraphviz
creating build/lib.linux-x86_64-2.7/pygraphviz/tests
copying pygraphviz/tests/test.py -> build/lib.linux-x86_64-2.7/pygraphviz/tests
copying pygraphviz/tests/__init__.py -> build/lib.linux-x86_64-2.7/pygraphviz/tests
copying pygraphviz/tests/unicode.txt -> build/lib.linux-x86_64-2.7/pygraphviz/tests
copying pygraphviz/tests/layout_draw.txt -> build/lib.linux-x86_64-2.7/pygraphviz/tests
copying pygraphviz/tests/graph.txt -> build/lib.linux-x86_64-2.7/pygraphviz/tests
copying pygraphviz/tests/attributes.txt -> build/lib.linux-x86_64-2.7/pygraphviz/tests
running build_ext
building 'pygraphviz._graphviz' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/pygraphviz
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/boost/graph/graphviz -I/usr/include/python2.7 -c pygraphviz/graphviz_wrap.c -o build/temp.linux-x86_64-2.7/pygraphviz/graphviz_wrap.o
pygraphviz/graphviz_wrap.c:2519:20: fatal error: cgraph.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1


What is cgraph.h and do I obtain it from somewhere?

Thanks.

Amy

Aric Hagberg

unread,
Mar 6, 2013, 2:38:59 PM3/6/13
to pygraphvi...@googlegroups.com
You'll need to install Graphviz (graphviz-dev package).
Aric
> --
> You received this message because you are subscribed to the Google Groups
> "pygraphviz-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to pygraphviz-disc...@googlegroups.com.
> To post to this group, send email to pygraphvi...@googlegroups.com.
> Visit this group at http://groups.google.com/group/pygraphviz-discuss?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



--
Aric Hagberg
Los Alamos National Laboratory
math.lanl.gov/~hagberg

Amy Koid

unread,
Mar 6, 2013, 2:45:15 PM3/6/13
to pygraphvi...@googlegroups.com
Hi there,

Thanks for your response.

I do have graphviz installed:

locate graphviz
/home/jay/software/boost_1_49_0/boost/graph/graphviz.hpp
/home/jay/software/boost_1_49_0/boost/graph/detail/read_graphviz_new.hpp
/home/jay/software/boost_1_49_0/boost/graph/detail/read_graphviz_spirit.hpp
/home/jay/software/boost_1_49_0/boost/graph/distributed/graphviz.hpp
/home/jay/software/boost_1_49_0/libs/graph/doc/read_graphviz.html
/home/jay/software/boost_1_49_0/libs/graph/doc/read_graphviz.rst
/home/jay/software/boost_1_49_0/libs/graph/doc/write-graphviz.html
/home/jay/software/boost_1_49_0/libs/graph/example/graphviz.cpp
/home/jay/software/boost_1_49_0/libs/graph/example/graphviz_example.dot
/home/jay/software/boost_1_49_0/libs/graph/example/graphviz_test.dot
/home/jay/software/boost_1_49_0/libs/graph/example/read_graphviz.cpp
/home/jay/software/boost_1_49_0/libs/graph/example/write_graphviz.cpp
/home/jay/software/boost_1_49_0/libs/graph/src/read_graphviz_new.cpp
/home/jay/software/boost_1_49_0/libs/graph/test/graphviz_test.cpp
/usr/include/boost/graph/graphviz.hpp
/usr/include/boost/graph/detail/read_graphviz_new.hpp
/usr/include/boost/graph/detail/read_graphviz_spirit.hpp
/usr/include/boost/graph/distributed/graphviz.hpp
/usr/lib/graphviz
/usr/lib/graphviz/config6
/usr/lib/graphviz/libgvplugin_core.so.6
/usr/lib/graphviz/libgvplugin_core.so.6.0.0
/usr/lib/graphviz/libgvplugin_dot_layout.so.6
/usr/lib/graphviz/libgvplugin_dot_layout.so.6.0.0
/usr/lib/graphviz/libgvplugin_gd.so.6
/usr/lib/graphviz/libgvplugin_gd.so.6.0.0
/usr/lib/graphviz/libgvplugin_neato_layout.so.6
/usr/lib/graphviz/libgvplugin_neato_layout.so.6.0.0
/usr/lib/graphviz/libgvplugin_pango.so.6
/usr/lib/graphviz/libgvplugin_pango.so.6.0.0
/usr/lib/graphviz/libgvplugin_xlib.so.6
/usr/lib/graphviz/libgvplugin_xlib.so.6.0.0
/usr/share/graphviz
/usr/share/doc/graphviz
/usr/share/doc/libgraphviz-perl
/usr/share/doc/graphviz/README.Debian
/usr/share/doc/graphviz/TODO.Debian
/usr/share/doc/graphviz/changelog.Debian.gz
/usr/share/doc/graphviz/copyright
/usr/share/doc/libgraphviz-perl/README.gz
/usr/share/doc/libgraphviz-perl/changelog.Debian.gz
/usr/share/doc/libgraphviz-perl/changelog.gz
/usr/share/doc/libgraphviz-perl/copyright
/usr/share/doc/libgraphviz-perl/examples
/usr/share/doc/libgraphviz-perl/examples/README
/usr/share/doc/libgraphviz-perl/examples/Yapp.output.gz
/usr/share/doc/libgraphviz-perl/examples/clusters.pl
/usr/share/doc/libgraphviz-perl/examples/clusters2.pl
/usr/share/doc/libgraphviz-perl/examples/directories.pl
/usr/share/doc/libgraphviz-perl/examples/dprofpp.graphviz
/usr/share/doc/libgraphviz-perl/examples/dumper.pl
/usr/share/doc/libgraphviz-perl/examples/make_all.pl
/usr/share/doc/libgraphviz-perl/examples/perly.output.gz
/usr/share/doc/libgraphviz-perl/examples/port.pl
/usr/share/doc/libgraphviz-perl/examples/ppmgraph.pl
/usr/share/doc/libgraphviz-perl/examples/primes.pl
/usr/share/doc/libgraphviz-perl/examples/primes_aux.pl
/usr/share/doc/libgraphviz-perl/examples/rank.pl
/usr/share/doc/libgraphviz-perl/examples/recdescent.pl
/usr/share/doc/libgraphviz-perl/examples/redcarpet.pl
/usr/share/doc/libgraphviz-perl/examples/regex.pl
/usr/share/doc/libgraphviz-perl/examples/remote.pl
/usr/share/doc/libgraphviz-perl/examples/simple.pl
/usr/share/doc/libgraphviz-perl/examples/text.pl
/usr/share/doc/libgraphviz-perl/examples/tmon.out.gz
/usr/share/doc/libgraphviz-perl/examples/undirected.pl
/usr/share/doc/libgraphviz-perl/examples/xml.pl
/usr/share/doc/libgraphviz-perl/examples/xref.pl
/usr/share/doc/libgraphviz-perl/examples/xref_aux.pl
/usr/share/doc/libgraphviz-perl/examples/yacc.pl
/usr/share/doc/libgraphviz-perl/examples/yapp.pl
/usr/share/graphviz/lefty
/usr/share/graphviz/lefty/box.lefty
/usr/share/graphviz/lefty/def.lefty
/usr/share/graphviz/lefty/dotty.lefty
/usr/share/graphviz/lefty/dotty_draw.lefty
/usr/share/graphviz/lefty/dotty_edit.lefty
/usr/share/graphviz/lefty/dotty_layout.lefty
/usr/share/graphviz/lefty/dotty_ui.lefty
/usr/share/graphviz/lefty/fractal.lefty
/usr/share/graphviz/lefty/fractal2.lefty
/usr/share/graphviz/lefty/lefty.psp
/usr/share/graphviz/lefty/slides.lefty
/usr/share/graphviz/lefty/tree.lefty
/usr/share/man/man7/graphviz.7.gz
/usr/share/menu/graphviz
/usr/share/mime/text/vnd.graphviz.xml
/var/lib/dpkg/info/graphviz.list
/var/lib/dpkg/info/graphviz.md5sums
/var/lib/dpkg/info/graphviz.postinst
/var/lib/dpkg/info/graphviz.postrm
/var/lib/dpkg/info/libgraphviz-perl.list
/var/lib/dpkg/info/libgraphviz-perl.md5sums

Aric Hagberg

unread,
Mar 6, 2013, 2:50:48 PM3/6/13
to pygraphvi...@googlegroups.com
Right, you need graphviz-dev too.
Aric
>> > email to pygraphviz-disc...@googlegroups.com.
>> > To post to this group, send email to pygraphvi...@googlegroups.com.
>> > Visit this group at
>> > http://groups.google.com/group/pygraphviz-discuss?hl=en.
>> > For more options, visit https://groups.google.com/groups/opt_out.
>> >
>> >
>>
>>
>>
>> --
>> Aric Hagberg
>> Los Alamos National Laboratory
>> math.lanl.gov/~hagberg
>
> --
> You received this message because you are subscribed to the Google Groups
> "pygraphviz-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to pygraphviz-disc...@googlegroups.com.

Amy Koid

unread,
Mar 6, 2013, 3:07:55 PM3/6/13
to pygraphvi...@googlegroups.com
Hi there,

Thank you for your help. It worked after I installed graphviz-dev.
>> > To post to this group, send email to pygraphvi...@googlegroups.com.
>> > Visit this group at
>> > http://groups.google.com/group/pygraphviz-discuss?hl=en.
>> > For more options, visit https://groups.google.com/groups/opt_out.
>> >
>> >
>>
>>
>>
>> --
>> Aric Hagberg
>> Los Alamos National Laboratory
>> math.lanl.gov/~hagberg
>
> --
> You received this message because you are subscribed to the Google Groups
> "pygraphviz-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an

Colin Wilder

unread,
Oct 2, 2014, 11:16:08 PM10/2/14
to pygraphvi...@googlegroups.com
I know this is an old thread but I'm hoping for some help. I'm an unsophisticated user compared to earlier folks here. I am running Windows 64 bit, with Python 2.7 in the Anaconda distribution. I'm using networkX (a package for manipulating network data). NetworkX interfaces with Pygraphviz and Graphviz and I'm at a roadblock installing Pygraphviz. Here's the error I'm getting:

C:\Anaconda\Lib\site-packages\pygraphviz-1.3rc1>python setup.py install
library_dirs=None
include_dirs=None
running install
running build
running build_py
running build_ext
building 'pygraphviz._graphviz' extension
C:\Anaconda\Scripts\gcc.bat -mdll -O -Wall -DGVDLL -IC:\Anaconda\include -IC:\An
aconda\PC -c pygraphviz/graphviz_wrap.c -o build\temp.win32-2.7\Release\pygraphv
iz\graphviz_wrap.o
pygraphviz/graphviz_wrap.c:2954:29: fatal error: graphviz/cgraph.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1

I can't decipher the error message - what do I need to do? From web searching, I think I need to have graphviz, graphviz-dev and/or libgraphviz-dev. I've tracked down versions of graphviz and graphviz-dev I think, but neither one has a setup.py file in it. I usually use pip install in my windows command line but that doesn't work with these. Anyone know what exactly I should do with these files? 

One lead I had is that the libgraphviz-dev (downloaded from http://packages.ubuntu.com/da/lucid/libgraphviz-dev) arrived as a zip file called data, and in its hierarchy included a file called cgraph.h (see error message above), specifically in C:\Anaconda\Lib\site-packages\pygraphviz-1.3rc1\data\usr\include\graphviz. So I kinda think that there are files that pygraphviz needs during installation that are not in the downloaded pygraphviz package, but are in libgraphviz. But do I put the libgraphviz folders somewhere manually? Should I use pip or something? Help! Thanks!  
Reply all
Reply to author
Forward
0 new messages