Not sure if this is the correct forum but I'm having some problems
installing pygraphviz that I hope you can help me with.
When I run python setup.py install I get the result:
error: command 'gcc' failed with exit status 1
together with a lot of compile errors in pygraphviz/graphviz_wrap.c
such as:
pygraphviz/graphviz_wrap.c:5266: error: ‘Swig_var_Agdirected_get’
undeclared (first use in this function)
pygraphviz/graphviz_wrap.c:5266: error: ‘Swig_var_Agdirected_set’
undeclared (first use in this function)
My system is a Red Hat Enterprise Linux Server release 5.4 (Tikanga)
with Python 2.4.
Graphviz is installed with the following packages (without problems):
graphviz-2.26.3-1.el5.x86_64.rpm
graphviz-devel-2.26.3-1.el5.x86_64.rpm
graphviz-python-2.26.3-1.el5.x86_64.rpm
On Thu, Sep 30, 2010 at 2:35 AM, Johan <charls...@gmail.com> wrote: > Hi,
> Not sure if this is the correct forum but I'm having some problems > installing pygraphviz that I hope you can help me with.
> When I run python setup.py install I get the result:
> error: command 'gcc' failed with exit status 1
> together with a lot of compile errors in pygraphviz/graphviz_wrap.c > such as:
> pygraphviz/graphviz_wrap.c:5266: error: ‘Swig_var_Agdirected_get’ > undeclared (first use in this function) > pygraphviz/graphviz_wrap.c:5266: error: ‘Swig_var_Agdirected_set’ > undeclared (first use in this function)
> My system is a Red Hat Enterprise Linux Server release 5.4 (Tikanga) > with Python 2.4. > Graphviz is installed with the following packages (without problems): > graphviz-2.26.3-1.el5.x86_64.rpm > graphviz-devel-2.26.3-1.el5.x86_64.rpm > graphviz-python-2.26.3-1.el5.x86_64.rpm
> What simple mistake am I making?
It's hard to tell without the entire error message. But maybe you are missing python-devel?
> On Thu, Sep 30, 2010 at 2:35 AM, Johan <charls...@gmail.com> wrote: > > Hi,
> > Not sure if this is the correct forum but I'm having some problems > > installing pygraphviz that I hope you can help me with.
> > When I run python setup.py install I get the result:
> > error: command 'gcc' failed with exit status 1
> > together with a lot of compile errors in pygraphviz/graphviz_wrap.c > > such as:
> > pygraphviz/graphviz_wrap.c:5266: error: ‘Swig_var_Agdirected_get’ > > undeclared (first use in this function) > > pygraphviz/graphviz_wrap.c:5266: error: ‘Swig_var_Agdirected_set’ > > undeclared (first use in this function)
> > My system is a Red Hat Enterprise Linux Server release 5.4 (Tikanga) > > with Python 2.4. > > Graphviz is installed with the following packages (without problems): > > graphviz-2.26.3-1.el5.x86_64.rpm > > graphviz-devel-2.26.3-1.el5.x86_64.rpm > > graphviz-python-2.26.3-1.el5.x86_64.rpm
> > What simple mistake am I making?
> It's hard to tell without the entire error message. But maybe you are > missing > python-devel?
> Aric
> -- > You received this message because you are subscribed to the Google Groups > "pygraphviz-discuss" group. > To post to this group, send email to pygraphviz-discuss@googlegroups.com. > To unsubscribe from this group, send email to > pygraphviz-discuss+unsubscribe@googlegroups.com<pygraphviz-discuss%2Bunsubs cribe@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/pygraphviz-discuss?hl=en.
i have a similar problem (trying to install pygraphviz on ubuntu).
Here is the error message:
las3@las3-Ubuntu:~/Downloads/pygraphviz-1.0$ python3 setup.py install
Trying pkg-config
library_path=b''
include_path=b'/usr/include/graphviz'
running install
running build
running build_py
running build_ext
building 'pygraphviz._graphviz' extension
gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -
Ib'/usr/include/graphviz' -I/usr/include/python3.1 -c pygraphviz/
graphviz_wrap.c -o build/temp.linux-x86_64-3.1/pygraphviz/
graphviz_wrap.o
pygraphviz/graphviz_wrap.c: In function ‘SWIG_Python_AddErrorMsg’:
pygraphviz/graphviz_wrap.c:862: warning: implicit declaration of
function ‘PyString_AsString’
pygraphviz/graphviz_wrap.c: In function ‘PySwigClientData_New’:
pygraphviz/graphviz_wrap.c:1253: warning: implicit declaration of
function ‘PyClass_Check’
pygraphviz/graphviz_wrap.c: In function ‘PySwigObject_format’:
pygraphviz/graphviz_wrap.c:1326: warning: implicit declaration of
function ‘PyString_FromString’
pygraphviz/graphviz_wrap.c:1326: warning: initialization makes pointer
from integer without a cast
pygraphviz/graphviz_wrap.c:1328: warning: implicit declaration of
function ‘PyString_Format’
pygraphviz/graphviz_wrap.c:1328: warning: assignment makes pointer
from integer without a cast
pygraphviz/graphviz_wrap.c: In function ‘PySwigObject_repr’:
pygraphviz/graphviz_wrap.c:1358: warning: implicit declaration of
function ‘PyString_FromFormat’
pygraphviz/graphviz_wrap.c:1358: warning: initialization makes pointer
from integer without a cast
pygraphviz/graphviz_wrap.c:1366: warning: implicit declaration of
function ‘PyString_ConcatAndDel’
pygraphviz/graphviz_wrap.c: In function ‘PySwigObject_print’:
pygraphviz/graphviz_wrap.c:1380: warning: passing argument 1 of
‘fputs’ makes pointer from integer without a cast
/usr/include/stdio.h:682: note: expected ‘const char * __restrict__’
but argument is of type ‘int’
pygraphviz/graphviz_wrap.c: In function ‘PySwigObject_str’:
pygraphviz/graphviz_wrap.c:1393: warning: return makes pointer from
integer without a cast
pygraphviz/graphviz_wrap.c: In function ‘_PySwigObject_type’:
pygraphviz/graphviz_wrap.c:1590: warning: initialization from
incompatible pointer type
pygraphviz/graphviz_wrap.c:1591: warning: initialization from
incompatible pointer type
pygraphviz/graphviz_wrap.c:1594: warning: initialization from
incompatible pointer type
pygraphviz/graphviz_wrap.c:1595: warning: initialization from
incompatible pointer type
pygraphviz/graphviz_wrap.c:1602: error: ‘coercion’ undeclared (first
use in this function)
pygraphviz/graphviz_wrap.c:1602: error: (Each undeclared identifier is
reported only once
pygraphviz/graphviz_wrap.c:1602: error: for each function it appears
in.)
pygraphviz/graphviz_wrap.c:1602: error: expected ‘}’ before numeric
constant
pygraphviz/graphviz_wrap.c:1622: warning: missing braces around
initializer
pygraphviz/graphviz_wrap.c:1622: warning: (near initialization for
‘tmp.ob_base.ob_base’)
pygraphviz/graphviz_wrap.c:1624: warning: initialization makes integer
from pointer without a cast
pygraphviz/graphviz_wrap.c:1627: warning: initialization from
incompatible pointer type
pygraphviz/graphviz_wrap.c:1628: warning: initialization from
incompatible pointer type
pygraphviz/graphviz_wrap.c:1632: warning: initialization from
incompatible pointer type
pygraphviz/graphviz_wrap.c:1635: error: ‘cmpfunc’ undeclared (first
use in this function)
pygraphviz/graphviz_wrap.c:1635: error: expected ‘}’ before
‘PySwigObject_compare’
pygraphviz/graphviz_wrap.c:1682: error: ‘PyTypeObject’ has no member
named ‘ob_type’
pygraphviz/graphviz_wrap.c:1584: warning: unused variable
‘PySwigObject_as_number’
pygraphviz/graphviz_wrap.c:1582: warning: unused variable
‘swigobject_doc’
pygraphviz/graphviz_wrap.c: In function ‘PySwigPacked_repr’:
pygraphviz/graphviz_wrap.c:1731: warning: return makes pointer from
integer without a cast
pygraphviz/graphviz_wrap.c:1733: warning: return makes pointer from
integer without a cast
pygraphviz/graphviz_wrap.c: In function ‘PySwigPacked_str’:
pygraphviz/graphviz_wrap.c:1742: warning: return makes pointer from
integer without a cast
pygraphviz/graphviz_wrap.c:1744: warning: return makes pointer from
integer without a cast
pygraphviz/graphviz_wrap.c: In function ‘_PySwigPacked_type’:
pygraphviz/graphviz_wrap.c:1789: warning: missing braces around
initializer
pygraphviz/graphviz_wrap.c:1789: warning: (near initialization for
‘tmp.ob_base.ob_base’)
pygraphviz/graphviz_wrap.c:1791: warning: initialization makes integer
from pointer without a cast
pygraphviz/graphviz_wrap.c:1794: warning: initialization from
incompatible pointer type
pygraphviz/graphviz_wrap.c:1795: warning: initialization from
incompatible pointer type
pygraphviz/graphviz_wrap.c:1796: warning: initialization from
incompatible pointer type
pygraphviz/graphviz_wrap.c:1798: error: ‘cmpfunc’ undeclared (first
use in this function)
pygraphviz/graphviz_wrap.c:1798: error: expected ‘}’ before
‘PySwigPacked_compare’
pygraphviz/graphviz_wrap.c:1845: error: ‘PyTypeObject’ has no member
named ‘ob_type’
pygraphviz/graphviz_wrap.c:1783: warning: unused variable
‘swigpacked_doc’
pygraphviz/graphviz_wrap.c: In function ‘_SWIG_This’:
pygraphviz/graphviz_wrap.c:1890: warning: return makes pointer from
integer without a cast
pygraphviz/graphviz_wrap.c: In function ‘SWIG_Python_GetSwigThis’:
pygraphviz/graphviz_wrap.c:1910: warning: implicit declaration of
function ‘PyInstance_Check’
pygraphviz/graphviz_wrap.c:1911: warning: implicit declaration of
function ‘_PyInstance_Lookup’
pygraphviz/graphviz_wrap.c:1911: warning: assignment makes pointer
from integer without a cast
pygraphviz/graphviz_wrap.c: In function
‘SWIG_Python_NewShadowInstance’:
pygraphviz/graphviz_wrap.c:2141: warning: implicit declaration of
function ‘PyInstance_NewRaw’
pygraphviz/graphviz_wrap.c:2141: warning: assignment makes pointer
from integer without a cast
pygraphviz/graphviz_wrap.c: In function ‘SWIG_Python_SetModule’:
pygraphviz/graphviz_wrap.c:2322: warning: implicit declaration of
function ‘Py_InitModule’
pygraphviz/graphviz_wrap.c:2323: warning: initialization makes pointer
from integer without a cast
pygraphviz/graphviz_wrap.c: In function ‘SWIG_Python_TypeQuery’:
pygraphviz/graphviz_wrap.c:2343: warning: initialization makes pointer
from integer without a cast
pygraphviz/graphviz_wrap.c: In function ‘SWIG_Python_TypeError’:
pygraphviz/graphviz_wrap.c:2432: warning: initialization makes pointer
from integer without a cast
pygraphviz/graphviz_wrap.c: At top level:
pygraphviz/graphviz_wrap.c:2519: fatal error: cgraph.h: No such file
or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
i have installed everything successfully with python2.7 but now i
wanted to install it with python3.1.
I also have python-dev installed.
las3@las3-Ubuntu:~/Downloads/pygraphviz-1.0$ sudo apt-get install
python3.1-dev
[sudo] password for las3:
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3.1-dev is already the newest version.
any idea how i can get this working? I recently switched from python
2.x to 3.x because the graph generation (post in networkx about huge
graph) is much faster (from 14 hours with 2.x to 1,6 hours with python
3.1!)
thanks a lot
Martin
On Sep 30, 10:53 am, Aric Hagberg <ahagb...@gmail.com> wrote:
> On Thu, Sep 30, 2010 at 2:35 AM, Johan <charls...@gmail.com> wrote:
> > Hi,
> > Not sure if this is the correct forum but I'm having some problems
> > installing pygraphviz that I hope you can help me with.
> > When I run python setup.py install I get the result:
> > error: command 'gcc' failed with exit status 1
> > together with a lot of compile errors in pygraphviz/graphviz_wrap.c
> > such as:
> > pygraphviz/graphviz_wrap.c:5266: error: ‘Swig_var_Agdirected_get’
> > undeclared (first use in this function)
> > pygraphviz/graphviz_wrap.c:5266: error: ‘Swig_var_Agdirected_set’
> > undeclared (first use in this function)
> > My system is a Red Hat Enterprise Linux Server release 5.4 (Tikanga)
> > with Python 2.4.
> > Graphviz is installed with the following packages (without problems):
> > graphviz-2.26.3-1.el5.x86_64.rpm
> > graphviz-devel-2.26.3-1.el5.x86_64.rpm
> > graphviz-python-2.26.3-1.el5.x86_64.rpm
> > What simple mistake am I making?
> It's hard to tell without the entire error message. But maybe you are missing
> python-devel?
On Wed, Nov 24, 2010 at 12:39 AM, martin <martin.hobelsber...@las3.de> wrote: > pygraphviz/graphviz_wrap.c:2519: fatal error: cgraph.h: No such file > or directory > compilation terminated. > error: command 'gcc' failed with exit status 1
For some reason the setup isn't finding cgraph.h (in libgraphviz-dev). But PyGraphviz doesn't work with Python3 so you wouldn't get much farther anyway I suspect.
I personally don't have any plans to port PyGraphviz to Python3.
> any idea how i can get this working? I recently switched from python> 2.x to 3.x because the graph generation (post in networkx about huge > graph) is much faster (from 14 hours with 2.x to 1,6 hours with python > 3.1!)
well, it was just another try to dump my graph to the harddisk
somehow.
As i wrote in the networkx group i construct a pretty huge graph (50k
nodes and 19mio edges, with node labels (pagerank,class attribute) and
edge labels (weight and a list to which i append strings iteratively
(for certain nodes that are used together in the same context) while
the graph is constructed...)).
This graph will (or should) serve as input for the algorithm i
constructed (recombinative simulated annealing). I am no expert on
python (started for this project with it) but i got everything working
fine with dummy data. To iteratively fill the graph with data it took
about 14 hours with python 2.7. I tried python 3.1 and now the graph
is finished in around one and a half hours (by finished i mean it is
in the memory. 11gig of ram is used). I tried to dump it to the
harddisk (with pickle, as text file with dot) but it didn´t work out.
It seems pickle can´t handle so much data.
i also tried the persistent shelve (thanks so much for providing it)
but after around one third of the graph (which took 11 hours) the
graph.db file was already 31 gig big on my harddisk. I am not sure
why. Maybe the shelve has so much overhead? Or i just implemented it
wrong. Anyway this did´t work out as well. :)
So i was quite happy after the 1.5 hours with python 3.1 (because i
think even if i could have dumped the graph to the disk to load it
would have taken almost the same amount of time). With pygraphviz i
just wanted to give the write_dot another try with python 3.1.
So i think the only solution for now is to buy more ram so that i can
work on the graph in the memory (i try to recombine nodes regarding
edge labels against a pareto front). :)
Thanks for the work you put in networkx. Without it i wouldn´t be as
far as i am right now with my solution! :)
Greetings
Martin
On Nov 24, 1:49 pm, Aric Hagberg <ahagb...@gmail.com> wrote:
> On Wed, Nov 24, 2010 at 12:39 AM, martin <martin.hobelsber...@las3.de> wrote:
> > pygraphviz/graphviz_wrap.c:2519: fatal error: cgraph.h: No such file
> > or directory
> > compilation terminated.
> > error: command 'gcc' failed with exit status 1
> For some reason the setup isn't finding cgraph.h (in libgraphviz-dev).
> But PyGraphviz doesn't work with Python3 so you wouldn't get much
> farther anyway I suspect.
> I personally don't have any plans to port PyGraphviz to Python3.
> > any idea how i can get this working? I recently switched from python> 2.x to 3.x because the graph generation (post in networkx about huge
> > graph) is much faster (from 14 hours with 2.x to 1,6 hours with python
> > 3.1!)
On Wed, Nov 24, 2010 at 12:48 PM, martin <martin.hobelsber...@las3.de> wrote: > As i wrote in the networkx group i construct a pretty huge graph (50k > nodes and 19mio edges, with node labels (pagerank,class attribute) and > edge labels (weight and a list to which i append strings iteratively > (for certain nodes that are used together in the same context) while > the graph is constructed...)).
> fine with dummy data. To iteratively fill the graph with data it took > about 14 hours with python 2.7. I tried python 3.1 and now the graph > is finished in around one and a half hours (by finished i mean it is > in the memory. 11gig of ram is used). I tried to dump it to the > harddisk (with pickle, as text file with dot) but it didn´t work out. > It seems pickle can´t handle so much data.
This seems like some IO issue with Python2.7. How are you reading the data?
> i also tried the persistent shelve (thanks so much for providing it) > but after around one third of the graph (which took 11 hours) the > graph.db file was already 31 gig big on my harddisk. I am not sure > why. Maybe the shelve has so much overhead? Or i just implemented it > wrong. Anyway this did´t work out as well. :)
> So i was quite happy after the 1.5 hours with python 3.1 (because i > think even if i could have dumped the graph to the disk to load it > would have taken almost the same amount of time). With pygraphviz i > just wanted to give the write_dot another try with python 3.1.
You probably don't want to write such a huge dot file anyway.
One option if you have enough memory is to use some remote object package like Pyro http://www.xs4all.nl/~irmen/pyro3/ so you can load the data in a process that runs permanently and use other Python processes to manipulate it.
On Wednesday, 24 November 2010 13:09:43 UTC+5:30, martin wrote:
> Hi,
> i have a similar problem (trying to install pygraphviz on ubuntu).
> Here is the error message:
> las3@las3-Ubuntu:~/Downloads/pygraphviz-1.0$ python3 setup.py install > Trying pkg-config > library_path=b'' > include_path=b'/usr/include/graphviz' > running install > running build > running build_py > running build_ext > building 'pygraphviz._graphviz' extension > gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC - > Ib'/usr/include/graphviz' -I/usr/include/python3.1 -c pygraphviz/ > graphviz_wrap.c -o build/temp.linux-x86_64-3.1/pygraphviz/ > graphviz_wrap.o > pygraphviz/graphviz_wrap.c: In function ‘SWIG_Python_AddErrorMsg’: > pygraphviz/graphviz_wrap.c:862: warning: implicit declaration of > function ‘PyString_AsString’ > pygraphviz/graphviz_wrap.c: In function ‘PySwigClientData_New’: > pygraphviz/graphviz_wrap.c:1253: warning: implicit declaration of > function ‘PyClass_Check’ > pygraphviz/graphviz_wrap.c: In function ‘PySwigObject_format’: > pygraphviz/graphviz_wrap.c:1326: warning: implicit declaration of > function ‘PyString_FromString’ > pygraphviz/graphviz_wrap.c:1326: warning: initialization makes pointer > from integer without a cast > pygraphviz/graphviz_wrap.c:1328: warning: implicit declaration of > function ‘PyString_Format’ > pygraphviz/graphviz_wrap.c:1328: warning: assignment makes pointer > from integer without a cast > pygraphviz/graphviz_wrap.c: In function ‘PySwigObject_repr’: > pygraphviz/graphviz_wrap.c:1358: warning: implicit declaration of > function ‘PyString_FromFormat’ > pygraphviz/graphviz_wrap.c:1358: warning: initialization makes pointer > from integer without a cast > pygraphviz/graphviz_wrap.c:1366: warning: implicit declaration of > function ‘PyString_ConcatAndDel’ > pygraphviz/graphviz_wrap.c: In function ‘PySwigObject_print’: > pygraphviz/graphviz_wrap.c:1380: warning: passing argument 1 of > ‘fputs’ makes pointer from integer without a cast > /usr/include/stdio.h:682: note: expected ‘const char * __restrict__’ > but argument is of type ‘int’ > pygraphviz/graphviz_wrap.c: In function ‘PySwigObject_str’: > pygraphviz/graphviz_wrap.c:1393: warning: return makes pointer from > integer without a cast > pygraphviz/graphviz_wrap.c: In function ‘_PySwigObject_type’: > pygraphviz/graphviz_wrap.c:1590: warning: initialization from > incompatible pointer type > pygraphviz/graphviz_wrap.c:1591: warning: initialization from > incompatible pointer type > pygraphviz/graphviz_wrap.c:1594: warning: initialization from > incompatible pointer type > pygraphviz/graphviz_wrap.c:1595: warning: initialization from > incompatible pointer type > pygraphviz/graphviz_wrap.c:1602: error: ‘coercion’ undeclared (first > use in this function) > pygraphviz/graphviz_wrap.c:1602: error: (Each undeclared identifier is > reported only once > pygraphviz/graphviz_wrap.c:1602: error: for each function it appears > in.) > pygraphviz/graphviz_wrap.c:1602: error: expected ‘}’ before numeric > constant > pygraphviz/graphviz_wrap.c:1622: warning: missing braces around > initializer > pygraphviz/graphviz_wrap.c:1622: warning: (near initialization for > ‘tmp.ob_base.ob_base’) > pygraphviz/graphviz_wrap.c:1624: warning: initialization makes integer > from pointer without a cast > pygraphviz/graphviz_wrap.c:1627: warning: initialization from > incompatible pointer type > pygraphviz/graphviz_wrap.c:1628: warning: initialization from > incompatible pointer type > pygraphviz/graphviz_wrap.c:1632: warning: initialization from > incompatible pointer type > pygraphviz/graphviz_wrap.c:1635: error: ‘cmpfunc’ undeclared (first > use in this function) > pygraphviz/graphviz_wrap.c:1635: error: expected ‘}’ before > ‘PySwigObject_compare’ > pygraphviz/graphviz_wrap.c:1682: error: ‘PyTypeObject’ has no member > named ‘ob_type’ > pygraphviz/graphviz_wrap.c:1584: warning: unused variable > ‘PySwigObject_as_number’ > pygraphviz/graphviz_wrap.c:1582: warning: unused variable > ‘swigobject_doc’ > pygraphviz/graphviz_wrap.c: In function ‘PySwigPacked_repr’: > pygraphviz/graphviz_wrap.c:1731: warning: return makes pointer from > integer without a cast > pygraphviz/graphviz_wrap.c:1733: warning: return makes pointer from > integer without a cast > pygraphviz/graphviz_wrap.c: In function ‘PySwigPacked_str’: > pygraphviz/graphviz_wrap.c:1742: warning: return makes pointer from > integer without a cast > pygraphviz/graphviz_wrap.c:1744: warning: return makes pointer from > integer without a cast > pygraphviz/graphviz_wrap.c: In function ‘_PySwigPacked_type’: > pygraphviz/graphviz_wrap.c:1789: warning: missing braces around > initializer > pygraphviz/graphviz_wrap.c:1789: warning: (near initialization for > ‘tmp.ob_base.ob_base’) > pygraphviz/graphviz_wrap.c:1791: warning: initialization makes integer > from pointer without a cast > pygraphviz/graphviz_wrap.c:1794: warning: initialization from > incompatible pointer type > pygraphviz/graphviz_wrap.c:1795: warning: initialization from > incompatible pointer type > pygraphviz/graphviz_wrap.c:1796: warning: initialization from > incompatible pointer type > pygraphviz/graphviz_wrap.c:1798: error: ‘cmpfunc’ undeclared (first > use in this function) > pygraphviz/graphviz_wrap.c:1798: error: expected ‘}’ before > ‘PySwigPacked_compare’ > pygraphviz/graphviz_wrap.c:1845: error: ‘PyTypeObject’ has no member > named ‘ob_type’ > pygraphviz/graphviz_wrap.c:1783: warning: unused variable > ‘swigpacked_doc’ > pygraphviz/graphviz_wrap.c: In function ‘_SWIG_This’: > pygraphviz/graphviz_wrap.c:1890: warning: return makes pointer from > integer without a cast > pygraphviz/graphviz_wrap.c: In function ‘SWIG_Python_GetSwigThis’: > pygraphviz/graphviz_wrap.c:1910: warning: implicit declaration of > function ‘PyInstance_Check’ > pygraphviz/graphviz_wrap.c:1911: warning: implicit declaration of > function ‘_PyInstance_Lookup’ > pygraphviz/graphviz_wrap.c:1911: warning: assignment makes pointer > from integer without a cast > pygraphviz/graphviz_wrap.c: In function > ‘SWIG_Python_NewShadowInstance’: > pygraphviz/graphviz_wrap.c:2141: warning: implicit declaration of > function ‘PyInstance_NewRaw’ > pygraphviz/graphviz_wrap.c:2141: warning: assignment makes pointer > from integer without a cast > pygraphviz/graphviz_wrap.c: In function ‘SWIG_Python_SetModule’: > pygraphviz/graphviz_wrap.c:2322: warning: implicit declaration of > function ‘Py_InitModule’ > pygraphviz/graphviz_wrap.c:2323: warning: initialization makes pointer > from integer without a cast > pygraphviz/graphviz_wrap.c: In function ‘SWIG_Python_TypeQuery’: > pygraphviz/graphviz_wrap.c:2343: warning: initialization makes pointer > from integer without a cast > pygraphviz/graphviz_wrap.c: In function ‘SWIG_Python_TypeError’: > pygraphviz/graphviz_wrap.c:2432: warning: initialization makes pointer > from integer without a cast > pygraphviz/graphviz_wrap.c: At top level: > pygraphviz/graphviz_wrap.c:2519: fatal error: cgraph.h: No such file > or directory > compilation terminated. > error: command 'gcc' failed with exit status 1
> i have installed everything successfully with python2.7 but now i > wanted to install it with python3.1. > I also have python-dev installed.
> las3@las3-Ubuntu:~/Downloads/pygraphviz-1.0$ sudo apt-get install > python3.1-dev > [sudo] password for las3: > Reading package lists... Done > Building dependency tree > Reading state information... Done > python3.1-dev is already the newest version.
> any idea how i can get this working? I recently switched from python > 2.x to 3.x because the graph generation (post in networkx about huge > graph) is much faster (from 14 hours with 2.x to 1,6 hours with python > 3.1!)
> thanks a lot
> Martin
> On Sep 30, 10:53 am, Aric Hagberg <ahagb...@gmail.com> wrote: > > On Thu, Sep 30, 2010 at 2:35 AM, Johan <charls...@gmail.com> wrote: > > > Hi,
> > > Not sure if this is the correct forum but I'm having some problems > > > installing pygraphviz that I hope you can help me with.
> > > When I run python setup.py install I get the result:
> > > error: command 'gcc' failed with exit status 1
> > > together with a lot of compile errors in pygraphviz/graphviz_wrap.c > > > such as:
> > > pygraphviz/graphviz_wrap.c:5266: error: ‘Swig_var_Agdirected_get’ > > > undeclared (first use in this function) > > > pygraphviz/graphviz_wrap.c:5266: error: ‘Swig_var_Agdirected_set’ > > > undeclared (first use in this function)
> > > My system is a Red Hat Enterprise Linux Server release 5.4 (Tikanga) > > > with Python 2.4. > > > Graphviz is installed with the following packages (without problems): > > > graphviz-2.26.3-1.el5.x86_64.rpm > > > graphviz-devel-2.26.3-1.el5.x86_64.rpm > > > graphviz-python-2.26.3-1.el5.x86_64.rpm
> > > What simple mistake am I making?
> > It's hard to tell without the entire error message. But maybe you are > missing > > python-devel?