python爬虫所需工具安装

买了爬虫的书,发现第一章竟然是各种工具的安装。既然如此在博客上做个记录好了,免得换环境的时候还要去翻书或者百度什么的。

以下基于centos

1.python

sudo yum groupinstall -y development tools
sudo yum install -y epel-release python34-devel libxslt-devel libxml2-devel openssl-devel
sudo yum install -y python34
sudo yum install -y python34-setuptools
sudo easy_install-3.4 pip

2.requests

pip3 install requests

3.lxml

pip3 install lxml

4.beautiful soup

pip3 install beautifulsoup4

5.pyquery

pip3 install pyquery

6.tessetocr

yum install -y tesseract
git clone https://github.com/tesseract-ocr/tessdata.git
sudo mv tessdata/* /usr/share/tesseract/tessdata
pip3 install tesserocr pillow

7.pymysql

pip3 install pymysql

8.mitmproxy

pip3 install mitmproxy

9.pyspider

pip3 install pyspider

发表评论

电子邮件地址不会被公开。 必填项已用*标注