安装scrapy报错 Python.h: 没有那个文件或目录


安装scrapy的时候报错,其实这个错误是一个间接,由其依赖引起。 

build/temp.linux-x86_64-2.7/twisted/test/raiser.o 
twisted/test/raiser.c:4:20: fatal error: Python.h: 没有那个文件或目录 
#include “Python.h” 

compilation terminated. 
error: command ‘x86_64-linux-gnu-gcc’ failed with exit status 1

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

sudo apt-get install python-dev


转自 http://blog.csdn.net/edward_liang_/article/details/50440045

猜你喜欢

转载自blog.csdn.net/qiqiyingse/article/details/79442645
今日推荐