安装 Scrapy for Python2.7
2017-05-04 17:23
281 查看
1. 简介
Scrapy是基于Python的网络爬虫框架,支持Python2.7 和 Python3.3以上。2. 安装
安装平台: Mac 10.112.1 先决条件
python 2.7pip
setuptools
lxml
openssl
2.2 安装scrapy
pip install scrapy
2.3 重新安装six
Mac自带的six库需要重新安装sudo rm -rf /Library/Python/2.7/site-packages/six* sudo rm -rf /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six* sudo pip install six
2.4 重新安装twisted
安装scrapy时自动安装的twisted框架版本有问题,需要重新安装pip install twisted==13.1.0
3. 使用
现在就能使用scrapy了$ scrapy Scrapy 1.3.3 - project: tutorial Usage: scrapy <command> [options] [args] Available commands: bench Run quick benchmark test check Check spider contracts commands crawl Run a spider edit Edit spider fetch Fetch a URL using the Scrapy downloader genspider Generate new spider using pre-defined templates list List available spiders parse Parse URL (using its spider) and print the results 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 Use "scrapy <command> -h" to see more info about a command
4. 相关链接
中文教程: http://scrapy-chs.readthedocs.io/zh_CN/0.24/intro/install.html#intro-install相关文章推荐
- Python-2.7安装Scrapy 1.0爬虫实例
- windows和python2.7环境下scrapy安装步骤
- 在Windows下 python2.7安装scrapy
- Python 2.7+ window10安装scrapy
- PIP安装Python的scipy,scrapy等包出现“failed building wheel for xxx”问题解决办法
- Scrapy win7 64 python2.7安装之坑
- PIP安装Python的scipy,scrapy等包出现“failed building wheel for xxx”问题解决办法
- Python安装scrapy常见的坑Unable to find vcvarsall.bat 或Failed building wheel for lxml
- python2.7 之centos7 安装 pip, Scrapy
- Windows10安装配置python2.7+scrapy环境
- SCRAPY 1.1 (FOR PYTHON3) 的安装步骤 (UBUNTU 15.10)
- Python(2.7版本)安装scrapy
- python2.7之MySQLdb模块 for linux安装
- window7 python2.7 安装scrapy
- PIP安装Python的scipy,scrapy等包出现“failed building wheel for xxx”问题解决办法
- windows7安装python2.7及scrapy
- python2.7中Scrapy的安装详细过程
- Python2.7安装Scrapy错误处理
- python2.7 安装scrapy后报错
- scrapy win7(64bit) python2.7(64 bit)安装