当前位置: 首页 > 工具软件 > ThriftPy > 使用案例 >

安装happybase,thriftpy不成功

宋凌龙
2023-12-01

安装happybase的时候会先装thriftpy。安装thriftpy会碰到

thriftpy/transport/cybase.c:13:20: fatal error: Python.h: No such file or directory
     #include "Python.h"
                        ^
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    
    ----------------------------------------
Command "/data/yuleke-match/env/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-2imhflbw/thriftpy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-32m7931x-record/install-record.txt --single-version-externally-managed --compile --install-headers /data/yuleke-match/env/include/site/python3.4/thriftpy" failed with error code 1 in /tmp/pip-build-2imhflbw/thriftpy/

经过查找,在http://stackoverflow.com/questions/21530577/fatal-error-python-h-no-such-file-or-directory中找到方法。

For apt (ubuntu, debian...):

sudo apt-get install python-dev  # for python2.x installs
sudo apt-get install python3-dev  # for python3.x installs

For yum (centos, redhat, fedora...):

sudo yum install python-devel

这样之后就能成功安装了

 类似资料: