python的install报错_Python-Snappy的安装 以及报错解决

直接使用pip install ,会报错:

cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++

snappymodule.cc:31:22: error: snappy-c.h: No such file or directory

snappymodule.cc:77: error: 'snappy_status' was not declared in this scope

snappymodule.cc:78: error: expected ',' or ';' before '{' token

snappymodule.cc:45: warning: '_state' defined but not used

snappymodule.cc:56: warning: 'SnappyCompressError' defined but not used

snappymodule.cc:57: warning: 'SnappyUncompressError' defined but not used

snappymodule.cc:58: warning: 'SnappyInvalidCompressedInputError' defined but not used

snappymodule.cc:59: warning: 'SnappyCompressedLengthError' defined but not used

snappymodule.cc:77: warning: 'snappy_strerror' defined but not used

error: command 'gcc' failed with exit status 1

0818b9ca8b590ca3270a3433284dd417.png

报错根源是找不到关键文件: snappy-c.h

解决办法:

最简便的解决办法是,先装一下 snappy-devel

yum install snappy-devel

然后再装 python-snappy,就没有问题了

pip install python-snappy

0818b9ca8b590ca3270a3433284dd417.png

你可能感兴趣的:(python的install报错_Python-Snappy的安装 以及报错解决)