python-snappy的安装小记

在弄个dota2的replay parser玩玩,在github上找到了几个,都是基于V社的demoinfo2(https://developer.valvesoftware.com/wiki/Dota_2_Demo_Format)。

但在装其中一个需要的包python-snappy时,出现了以下的报错:

$ sudo python setup.py build
  running build
  running build_ext
  building 'snappy' extension
  gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c snappymodule.cc -o build/temp.linux-x86_64-2.7/snappymodule.o
  cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
  snappymodule.cc:31:22: fatal error: snappy-c.h: No such file or directory
  compilation terminated.
  error: command 'gcc' failed with exit status 1

google之,在stackoverflow上找到了同样的问题:http://stackoverflow.com/questions/11416024/error-installing-python-snappy

根据其解决方案,先安装snappy C library:http://code.google.com/p/snappy/downloads/list

问题解决。

posted @ 2013-10-01 20:23  river_run  阅读(5871)  评论(0编辑  收藏  举报