16

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?

Dair
  • 15,910
  • 9
  • 62
  • 107
  • are you sure you have the headers? try to run `python3-config --include` – mic4ael Aug 09 '16 at 20:28
  • @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 Aug 09 '16 at 20:29
  • sorry I was thinking about python development headers – mic4ael Aug 09 '16 at 20:30
  • 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 Aug 09 '16 at 21:25

2 Answers2

16

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

mic4ael
  • 7,974
  • 3
  • 29
  • 42
  • 1
    I think I will leave this for a couple days to see if anyone can find a work around, otherwise I will accept. Main reason being: I heard that `guppy` was better than `objgraph` for detecting "memory leaks". But if I have to use `objgraph` I will. Thank you for the response. – Dair Aug 09 '16 at 22:23
7

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

pip3 install guppy3
David Foster
  • 6,931
  • 4
  • 41
  • 42