#wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz
#tar xvf Python-2.7.3.tgz
#cd Python-2.7.3
#./configure
#make && make install
验证python
[root@~]# python
Python 2.7.3 (default, Feb 28 2013, 03:08:43)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-50)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz
#wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz
#tar zxvf setuptools-0.6c11.tar.gz
#cd setuptools-0.6c11
#python2.7 setup.py install
#cd setuptools-0.6c11
#easy_install Twisted
#cd setuptools-0.6c11
#easy_install w3lib
#cd setuptools-0.6c11
#easy_install lxml
验证lxml安装
[root@~]# python
Python 2.7.3 (default, Feb 28 2013, 03:08:43)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-50)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import lxml
>>> exit()
#wget http://launchpadlibrarian.net/58498441/pyOpenSSL-0.11.tar.gz
#tar zxvf pyOpenSSL-0.11.tar.gz
#cd pyOpenSSL-0.11
#python setup.py install
#cd setuptools-0.6c11
#easy_install pip
#pip install scrapy
验证安装
[root@~]# scrapy
Scrapy 0.16.4 - no active project
Usage:
scrapy [options] [args]
Available commands:
fetch Fetch a URL using the Scrapy downloader
runspider Run a self-contained spider (without creating a project)
settings Get settings values
shell Interactive scraping console
startproject Create new project
version Print Scrapy version
view Open URL in browser, as seen by Scrapy
[ more ] More commands available when run from project directory
Use "scrapy -h" to see more info about a command