【问题标题】:python.h not fond when trying to install gevent-socketiopython.h 在尝试安装 gevent-socketio 时不喜欢
【发布时间】:2014-01-02 04:16:54
【问题描述】:

这是我尝试安装 gevent-socketio 时的错误

安装收集的包:gevent、greenlet 为 gevent 运行 setup.py install 构建“gevent.core”扩展 gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes >-fPIC -DLIBEV_EMBED=1 -DEV_COMMON= -DEV_CHECK_ENABLE=0 -DEV_CLEANUP_ENABLE=0 >-DEV_EMBED_ENABLE=0 -DEV_PERIODIC_ENABLE=0 -Ibuild/temp.linux-x86_64-2.7/libev -Ilibev >-I/usr/include/python2.7 -c gevent/gevent.core.c -o build/temp.linux-x86_64-2.7/gevent/gevent.核心.o gevent/gevent.core.c:17:20:致命错误:Python.h:没有这样的文件或目录 编译终止。 错误:命令“gcc”失败,退出状态为 1 命令的完整输出 /usr/bin/python -c "import setuptools;file='/var/www/bleu/build/gevent/setup.py';exec(compile(open(file).read().replace('\r\n', '\n'), file, 'exec'))" install --single-version-externally -托管--record /tmp/pip-_kv6Fy-record/install-record.txt: 运行安装

运行构建

运行 build_py

运行 build_ext

构建“gevent.core”扩展

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC > -DLIBEV_EMBED=1 -DEV_COMMON= -DEV_CHECK_ENABLE=0 -DEV_CLEANUP_ENABLE=0 -DEV_EMBED_ENABLE=0 -DEV_PERIODIC_ENABLE =0 -Ibuild/temp.linux-x86_64-2.7/libev -Ilibev -I/usr/include/python2.7 -c gevent/gevent.core.c -o build/temp.linux-x86_64-2.7/gevent/gevent .core.o

gevent/gevent.core.c:17:20:致命错误:Python.h:没有这样的文件或目录

编译终止。

错误:命令“gcc”失败,退出状态为 1

你知道我该如何解决这个问题吗?

【问题讨论】:

    标签: python django gevent-socketio


    【解决方案1】:

    安装开发包

    CentOS/RHEL::

    yum install python-devel
    

    Debian/Ubuntu:

    apt-get install python-dev
    

    【讨论】:

      猜你喜欢
      • 2015-03-13
      • 2011-09-25
      • 1970-01-01
      • 1970-01-01
      • 2020-11-30
      • 1970-01-01
      • 2018-07-18
      • 2012-04-02
      • 2020-06-26
      相关资源
      最近更新 更多