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

問題解決。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM