1、安装python
wget https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz tar -zxvf Python-2.7.10.tgz cd Python-2.7.10 ./configure make all make install
make clean make distclean
mv /usr/bin/python /usr/bin/python2.6.6_bak ln -s /usr/local/bin/python2.7 /usr/bin/python
2、安装pip(使用9.0.1)
#下载9.0.1版本的pip压缩包 https://pypi.python.org/pypi/pip/9.0.1
#
#python setup.py install
3、安装pip时出现的问题
# python setup.py install
setup.py not found
(1)下载setuptools包
#
(2)解压setuptools包(这一步我出现不能解压的问题,我本地解压完,winscp上传)
#
(3)切换到当前文件夹
#(4)编译setuptools
#python setup.py build
(5)开始执行setuptools安装
#python setup.py install
4、问题:No module named _sqlite3
解决:
1,首先安装 sqlite-devel
yum install sqlite-devel
2,重新编译安装Python
./configure
make
make install
参考:https://www.cnblogs.com/rwxwsblog/p/4557123.html
使用yum升级:http://blog.csdn.net/qq_31550425/article/details/51885434
scrapy 文档:http://scrapy-chs.readthedocs.io/zh_CN/0.24/topics/firebug.html