您的位置:首页 > 移动开发

安装happybase,thriftpy不成功

2017-02-14 17:57 295 查看
安装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

这样之后就能成功安装了
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: