5.7.1. python安装

python使用小技巧:

shell> python -v
python>>> import sys
python>>> print sys.path    # 打印系统安装路径
easy_install web.py
easy_install redis
easy_install pymongo
easy_install mysql-python
sudo easy_install -U distribute  # 不知道干什么用的,但我在安装mysql-python时,让我先安装这个才行

sudo easy_install requests    # 封装了urllib,爬虫相关

# http://beautifulsoup.readthedocs.org/zh_CN/latest/
sudo easy_install beautifulsoup4   # 可代替正则
easy_install lxml        # 解析器1
easy_install html5lib    # 解析器2