0. python -V (此时显示为2.6.6)
1. yum -y update
2. yum groupinstall -y development
3. yum install -y zlib-dev openssl-devel sqlite-devel bzip2-devel
4. wget http://www.python.org/ftp/python/2.7.6/Python-2.7.6.tar.xz
5. tar -xvf Python-2.7.6.tar.xz
6. cd Python-2.7.6
7. ./configure
8. make && make altinstall
9. mv /usr/bin/python /usr/bin/python2.6.6
10. ln -s /usr/local/bin/python2.7 /usr/bin/python
11. vi /usr/bin/yum(#!/usr/bin/python 改为 #!/usr/bin/python2.6.6)
12. wget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-1.4.2.tar.gz
13. tar -xvf setuptools-1.4.2.tar.gz
14. cd setuptools-1.4.2
15. python setup.py install
16. ln -s /usr/local/bin/easy_install-2.7 /usr/bin/easy_install
17. easy_install pip
18. curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python2.7
19. yum -y install libxslt-devel
20. yum -y install libffi-devel
21. pip install scrapy
Successfully installed scrapy Twisted w3lib queuelib lxml pyOpenSSL cssselect six
scrapy -h