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. wgethttp://www.python.or<wbr>g/ftp/python/2.7.6/P<wbr>ython-2.7.6.tar.xz</wbr></wbr>
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-certificatehttps://pypi.python.<wbr>org/packages/source/<wbr>s/setuptools/setupto<wbr>ols-1.4.2.tar.gz</wbr></wbr></wbr>
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. curlhttps://raw.github.c<wbr>om/pypa/pip/master/c<wbr>ontrib/get-pip.py</wbr></wbr>| 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