Guppy Error: expected function body after function declarator
If you are trying to install guppy like this:
pip3 install guppy
And you 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
Solution:
(1) First check your version of python.
1.Open command prompt
2.type command: python --version
(This should tell you the version of Python installed in your system.)
If your're using Python3, you need to install the guppy3 fork of guppy that supports Python 3:
pip3 install guppy3
As Python3 does not support Guppy.
Although it seems that guppy
library works only for Python 2.x. An alternative could be objgraph.
(2) If your using Python2,use the below command.
pip install guppy
(3)If still nothing works, follow the below steps:
- 1.Run update command to update package repositories and get latest package information.
- 2.Run the install command with -y flag to quickly install the packages and dependencies. sudo apt-get install -y python-dev.
- 3.Check the system logs to confirm that there are no related errors.
Comments