ubuntu安装scrapy需要的依赖

ubuntu安装必要的编译环境是apt-get install build-essential()(centos是 yum groupinstall "Development Tools")

ubuntu直接使用pip install scrapy会出现twisted/test/raiser.c:4:20: fatal error: Python.h: No such file or directory错误,这种情况需要安装python的dev依赖apt-get install python-dev python-pip libxml2-dev libxslt1-dev zlib1g-dev libffi-dev libssl-dev之后就可以了。

centos直接使用pip install scrapy会出现twisted/test/raiser.c:4:20: fatal error: Python.h: No such file or directory错误,需要安装yum install python-devel libxslt-devel libxml2-devel libffi-devel openssl-devel zlib1g-devel libxslt-devel

windows安装scrapy的时候twisted报错,从https://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted下载wheel文件安装即可