Ubuntu 10.10 安装Scrapy过程实录

想了解一下spider,后来看到开源的Scrapy,因而在个人ubuntun10.10下安装。安装过程以下:python

没有安装 easy_install的先安装,根据scrapy的文档上安装:sudo easy_install -U Scrapyubuntu

安装过程当中提示scrapy

NOTE: Trying to build without Cython, pre-generated 'src/lxml/lxml.etree.c' needs to be available.
ERROR: /bin/sh: xslt-config: not found

** make sure the development packages of libxml2 and libxslt are installed **

Using build configuration of libxslt
src/lxml/lxml.etree.c:4: fatal error: Python.h: 没有那个文件或目录
compilation terminated.
error: Setup script exited with error: command 'gcc' failed with exit status 1ide

通过google查询得知没有安装libxml2-dev和libxlst1-devui

为保险起见,请依次安装以下:google

sudo apt-get install gccxml

sudo apt-get install python-devip

sudo apt-get install libxml2 libxml2-dev文档

sudo apt-get install libxslt1.1 libxslt1-devget

后面的是数字1,不是字母l,不要写错了。

而后再次运行sudo easy_install -U -Scrapy

成功。

相关文章
相关标签/搜索