centos 6.2 安装scrapy error: Python.h: No such file or directory

Running Twisted-12.2.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-5d2sWW/Twisted-12.2.0/egg-dist-tmp-k7LYZq html

twisted/runner/portmap.c:10:20: error: Python.h: No such file or directory python

Solution ubuntu

目录/usr/include/python2.6/缺乏Python.h文件code

# CentOS 使用下面命令# yum install python-devel
 

解决 Python.h:没有那个文件或目录 错误的方法

今天在实验室的ubuntu机子上安装Eventlet,在安装依赖包greenlet时出现错误,出现编译错误。 htm

错误以下: blog

In file included from greenlet.c:5:0: ip

greenlet.h:8:20: 致命错误: Python.h:没有那个文件或目录 get

编译中断。 it

error: Setup script exited with error: command 'gcc' failed with exit status 1 io

解决方法是安装python-dev,这是Python的头文件和静态库包:

sudo apt-get install python-dev

相关文章
相关标签/搜索