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

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

Solution

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

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

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

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

错误如下:

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

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

编译中断。

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

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

sudo apt-get install python-dev

转载于:https://my.oschina.net/dddttttt/blog/80218

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值