ubuntu配置scrapy手記

注意:我是在root權限下運行下面的命令的,請根據自己的需要確定是否要在命令前面加上『sudo』以root身份運行~

首先安裝python= =
apt-get install python
然後安裝setuptools(一個python的設置工具。。)
wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | python
然後安裝scrapy的各種支持庫
pip install w3lib
pip install twisted
pip install cssselect
pip install pyOpenSSL
apt-get install libxml2 libxslt python-lxml
安裝主角:scrapy
pip install scrapy
然後輸入scrapy看看是否安裝成功:
正常的話得到以下類似信息:

Scrapy 0.22.0 – no active project

Usage:
scrapy <command> [options] [args]

Available commands:
bench Run quick benchmark test
fetch Fetch a URL using the Scrapy downloader
runspider Run a self-contained spider (without creating a project)
settings Get settings values
shell Interactive scraping console
startproject Create new project
version Print Scrapy version
view Open URL in browser, as seen by Scrapy

[ more ] More commands available when run from project directory

Use “scrapy <command> -h” to see more info about a command

作者

OX

我是一個住在大阪農村,在家種菜的人。 曾經一時興起學吹單簧管,結果沒堅持下來。 現在一邊上學一邊炒作垃圾股賺零花錢。

One thought on “ubuntu配置scrapy手記”

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *