1

编辑:https ://stackoverflow.com/a/38860927/1112524抱歉

当我尝试安装guppy/heapy进行内存分析时,

pip3 install guppy --user

我明白了

creating build/temp.linux-x86_64-3.4

creating build/temp.linux-x86_64-3.4/src

creating build/temp.linux-x86_64-3.4/src/sets

x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.4m -c src/sets/sets.c -o build/temp.linux-x86_64-3.4/src/sets/sets.o

src/sets/sets.c:76:1: warning: return type defaults to ‘int’ [-Wreturn-type]

 DL_EXPORT (void)

 ^

src/sets/sets.c: In function ‘DL_EXPORT’:

src/sets/sets.c:39:18: error: expected declaration specifiers before ‘initsetsc’

 #define INITFUNC initsetsc

                  ^

src/sets/sets.c:77:1: note: in expansion of macro ‘INITFUNC’

 INITFUNC (void)

 ^

src/sets/sets.c:108:1: error: expected ‘{’ at end of input

 }

 ^

src/sets/sets.c: At top level:

src/sets/sets.c:45:20: warning: ‘module_methods’ defined but not used [-Wunused-variable]

 static PyMethodDef module_methods[] =

                    ^

src/sets/sets.c:67:18: warning: ‘nysets_heapdefs’ defined but not used [-Wunused-variable]

 static NyHeapDef nysets_heapdefs[] = {

                  ^

src/sets/sets.c: In function ‘DL_EXPORT’:

src/sets/sets.c:108:1: warning: control reaches end of non-void function [-Wreturn-type]

 }

 ^

error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

我怎样才能解决这个问题?

我尝试从这个问题安装东西,但它没有用

错误:安装脚本退出并出现错误:命令“x86_64-linux-gnu-gcc”失败,退出状态为 1

另外,刚才我碰巧尝试了Python 2

pip install guppy --user

它奏效了。

4

0 回答 0