15
votes

I am trying to install guppy. My program uses python3 so I must use pip3 exclusively. When I run:

pip3 install guppy

I get:

src/sets/sets.c:77:1: error: expected function body after function declarator
INITFUNC (void)
^
src/sets/sets.c:39:18: note: expanded from macro 'INITFUNC'
#define INITFUNC initsetsc
                 ^
1 error generated.
error: command 'clang' failed with exit status 1

I tried doing this, even thourgh it wasn't the same and exported gcc and g++:

➜  ~ export CC=gcc
➜  ~ export CXX=g++

Running again:

src/sets/sets.c:77:1: error: expected function body after function declarator
INITFUNC (void)
^
src/sets/sets.c:39:18: note: expanded from macro 'INITFUNC'
#define INITFUNC initsetsc
                 ^
1 error generated.
error: command 'gcc' failed with exit status 1

Most who had this issue used sudo apt-get python-dev or something of the like to resolve this issue, I couldn't find an equivalent for Mac. Is there a way to resolve this issue?

2
are you sure you have the headers? try to run python3-config --include - mic4ael
@mic4ael: I'm not really sure what headers you need, but when I run that I get: -I/usr/local/Cellar/python3/3.5.2_1/Frameworks/Python.framework/Versions/3.5/include/python3.5m -I/usr/local/Cellar/python3/3.5.2_1/Frameworks/Python.framework/Versions/3.5/include/python3.5m. Is it correct? - Dair
sorry I was thinking about python development headers - mic4ael
so far I can only say it is related with python 3 since it works perfectly fine when I try to install it for python 2.x - mic4ael

2 Answers

16
votes

Unfortunately it seems that guppy library works only for Python 2.x. An alternative could be objgraph

4
votes

Try installing the guppy3 fork of guppy that supports Python 3:

pip3 install guppy3