python爬虫之scrapy安装(一)
简介:
安装环境:
Windows安装:
注意:
1、从上往下依次安装依赖包,.whl文件直接pip3 install 文件绝对路径和名字即可安装
2、注意你的pip版本,下载9.0以上版本。
Linux:
下面是介绍Centos6.5版本安装,注意yum源的配置。
安装依赖包。
yum install python3-dev yum install -y python-dev python-pip libxml2-dev libxslt1-dev zlib1g-dev libffi-dev libssl-dev
检查pip版本是不是9.0.1
[root@localhost /]# pip3 --version
pip 9.0.1 from /usr/local/lib/python3.6/site-packages (python 3.6)
开始安装scrapy。(linux系统不像windows那样依赖包需要我们一个一个安装,它会自动安装所有需要安装的依赖包,省略了很多步骤和问题)
[root@localhost /]# pip3 install scrapy
Collecting scrapy
Downloading Scrapy-1.4.0-py2.py3-none-any.whl (248kB)
100% |████████████████████████████████| 256kB 29kB/s
Collecting PyDispatcher>=2.0.5 (from scrapy)
Downloading PyDispatcher-2.0.5.tar.gz
Collecting parsel>=1.1 (from scrapy)
Downloading parsel-1.2.0-py2.py3-none-any.whl
Collecting service-identity (from scrapy)
Downloading service_identity-17.0.0-py2.py3-none-any.whl
Collecting w3lib>=1.17.0 (from scrapy)
Downloading w3lib-1.18.0-py2.py3-none-any.whl
Collecting queuelib (from scrapy)
Downloading queuelib-1.4.2-py2.py3-none-any.whl
Collecting lxml (from scrapy)
Downloading lxml-4.1.0-cp36-cp36m-manylinux1_x86_64.whl (5.6MB)
100% |████████████████████████████████| 5.6MB 13kB/s
Collecting cssselect>=0.9 (from scrapy)
Downloading cssselect-1.0.1-py2.py3-none-any.whl
Collecting six>=1.5.2 (from scrapy)
Downloading six-1.11.0-py2.py3-none-any.whl
Collecting pyOpenSSL (from scrapy)
Downloading pyOpenSSL-17.3.0-py2.py3-none-any.whl (51kB)
100% |████████████████████████████████| 51kB 11kB/s
Collecting Twisted>=13.1.0 (from scrapy)
Downloading Twisted-17.9.0.tar.bz2 (3.0MB)
100% |████████████████████████████████| 3.0MB 20kB/s
Collecting attrs (from service-identity->scrapy)
Downloading attrs-17.2.0-py2.py3-none-any.whl
Collecting pyasn1-modules (from service-identity->scrapy)
Downloading pyasn1_modules-0.1.5-py2.py3-none-any.whl (60kB)
100% |████████████████████████████████| 61kB 79kB/s
Collecting pyasn1 (from service-identity->scrapy)
Downloading pyasn1-0.3.7-py2.py3-none-any.whl (63kB)
100% |████████████████████████████████| 71kB 87kB/s
Collecting cryptography>=1.9 (from pyOpenSSL->scrapy)
Downloading cryptography-2.1.2-cp36-cp36m-manylinux1_x86_64.whl (2.2MB)
100% |████████████████████████████████| 2.2MB 16kB/s
Collecting zope.interface>=4.0.2 (from Twisted>=13.1.0->scrapy)
Downloading zope.interface-4.4.3-cp36-cp36m-manylinux1_x86_64.whl (173kB)
100% |████████████████████████████████| 174kB 20kB/s
Collecting constantly>=15.1 (from Twisted>=13.1.0->scrapy)
Downloading constantly-15.1.0-py2.py3-none-any.whl
Collecting incremental>=16.10.1 (from Twisted>=13.1.0->scrapy)
Downloading incremental-17.5.0-py2.py3-none-any.whl
Collecting Automat>=0.3.0 (from Twisted>=13.1.0->scrapy)
Downloading Automat-0.6.0-py2.py3-none-any.whl
Collecting hyperlink>=17.1.1 (from Twisted>=13.1.0->scrapy)
Downloading hyperlink-17.3.1-py2.py3-none-any.whl (73kB)
100% |████████████████████████████████| 81kB 46kB/s
Collecting idna>=2.1 (from cryptography>=1.9->pyOpenSSL->scrapy)
Downloading idna-2.6-py2.py3-none-any.whl (56kB)
100% |████████████████████████████████| 61kB 48kB/s
Collecting asn1crypto>=0.21.0 (from cryptography>=1.9->pyOpenSSL->scrapy)
Downloading asn1crypto-0.23.0-py2.py3-none-any.whl (99kB)
100% |████████████████████████████████| 102kB 19kB/s
Collecting cffi>=1.7; platform_python_implementation != "PyPy" (from cryptography>=1.9->pyOpenSSL->scrapy)
Downloading cffi-1.11.2-cp36-cp36m-manylinux1_x86_64.whl (419kB)
100% |████████████████████████████████| 430kB 18kB/s
Requirement already satisfied: setuptools in /usr/local/lib/python3.6/site-packages (from zope.interface>=4.0.2->Twisted>=13.1.0->scrapy)
Collecting pycparser (from cffi>=1.7; platform_python_implementation != "PyPy"->cryptography>=1.9->pyOpenSSL->scrapy)
Downloading pycparser-2.18.tar.gz (245kB)
100% |████████████████████████████████| 256kB 62kB/s
Installing collected packages: PyDispatcher, six, w3lib, lxml, cssselect, parsel, idna, asn1crypto, pycparser, cffi, cryptography, pyOpenSSL, attrs, pyasn1, pyasn1-modules, service-identity, queuelib, zope.interface, constantly, incremental, Automat, hyperlink, Twisted, scrapy
Running setup.py install for PyDispatcher ... done
Running setup.py install for pycparser ... done
Running setup.py install for Twisted ... done
Successfully installed Automat-0.6.0 PyDispatcher-2.0.5 Twisted-17.9.0 asn1crypto-0.23.0 attrs-17.2.0 cffi-1.11.2 constantly-15.1.0 cryptography-2.1.2 cssselect-1.0.1 hyperlink-17.3.1 idna-2.6 incremental-17.5.0 lxml-4.1.0 parsel-1.2.0 pyOpenSSL-17.3.0 pyasn1-0.3.7 pyasn1-modules-0.1.5 pycparser-2.18 queuelib-1.4.2 scrapy-1.4.0 service-identity-17.0.0 six-1.11.0 w3lib-1.18.0 zope.interface-4.4.3
[root@localhost /]# python3
Python 3.6.3 (default, Oct 25 2017, 10:18:57)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import scrapy
>>>
python爬虫之scrapy安装(一)的更多相关文章
- python爬虫的scrapy安装+pymongo的安装
我的:python2.7版本 32位 注意scrapy只支持2.7及以上的版本. 1.安装python 2.安装pip 安装pip就不赘述了,网上很多教学 pip安装时要注意更新,如果pip版本 ...
- python爬虫框架—Scrapy安装及创建项目
linux版本安装 pip3 install scrapy 安装完成 windows版本安装 pip install wheel 下载twisted,网址:http://www.lfd.uci.edu ...
- Python爬虫框架--Scrapy安装以及简单实用
scrapy框架 框架 -具有很多功能且具有很强通用性的一个项目模板 环境安装: Linux: pip3 install scrapy Windows: ...
- Python爬虫框架Scrapy安装使用步骤
一.爬虫框架Scarpy简介Scrapy 是一个快速的高层次的屏幕抓取和网页爬虫框架,爬取网站,从网站页面得到结构化的数据,它有着广泛的用途,从数据挖掘到监测和自动测试,Scrapy完全用Python ...
- Linux 安装python爬虫框架 scrapy
Linux 安装python爬虫框架 scrapy http://scrapy.org/ Scrapy是python最好用的一个爬虫框架.要求: python2.7.x. 1. Ubuntu14.04 ...
- 教你分分钟学会用python爬虫框架Scrapy爬取心目中的女神
本博文将带领你从入门到精通爬虫框架Scrapy,最终具备爬取任何网页的数据的能力.本文以校花网为例进行爬取,校花网:http://www.xiaohuar.com/,让你体验爬取校花的成就感. Scr ...
- 【转载】教你分分钟学会用python爬虫框架Scrapy爬取心目中的女神
原文:教你分分钟学会用python爬虫框架Scrapy爬取心目中的女神 本博文将带领你从入门到精通爬虫框架Scrapy,最终具备爬取任何网页的数据的能力.本文以校花网为例进行爬取,校花网:http:/ ...
- 0.Python 爬虫之Scrapy入门实践指南(Scrapy基础知识)
目录 0.0.Scrapy基础 0.1.Scrapy 框架图 0.2.Scrapy主要包括了以下组件: 0.3.Scrapy简单示例如下: 0.4.Scrapy运行流程如下: 0.5.还有什么? 0. ...
- Python爬虫框架Scrapy实例(三)数据存储到MongoDB
Python爬虫框架Scrapy实例(三)数据存储到MongoDB任务目标:爬取豆瓣电影top250,将数据存储到MongoDB中. items.py文件复制代码# -*- coding: utf-8 ...
随机推荐
- centos7+nginx负载均衡Tomcat服务
接着上一篇:www.cnblogs.com/lkun/p/8252815.html 我们在上一篇在一台centos7服务器上部署了两个nginx,接下来我们使用一个nginx实现tomcat的负载均衡 ...
- RandomAccess
在List集合中,我们经常会用到ArrayList以及LinkedList集合,但是通过查看源码,就会发现ArrayList实现RandomAccess接口,但是RandomAccess接口里面是空的 ...
- DBCA静默方式建库
使用DBCA的图形方式建库实在有诸多不便,但是使用静默方式建库就比较方便了,一个命令即可搞定. 使用dbca安装oracle数据库实例也有差不多两种方法:一种就是根据模板文件进行安装,在上文中提到了在 ...
- Unexpected end of JSON input while parsing near
运行 npm cache clean --force 即可解决pm install出现”Unexpected end of JSON input while parsing near”错误.
- JS中caller和callee
caller: caller是函数对象的一个属性,指的是这个函数对象的调用者,如果调用者,如果是顶层调用者,则返回null. 例: function func(){ console.log(func. ...
- React-菜鸟学习笔记(一)
新公司的项目前端架构用的是react.js 之前孤陋寡闻并没听说过,想着后期开发和维护多少要会点前端的东西,就简单研究一下.个人的学习习惯能写代码的就不写文字,必要的地方加两行注释,代码一行行敲下去, ...
- 分布式系统消息中间件——RabbitMQ的使用进阶篇
分布式系统消息中间件--RabbitMQ的使用进阶篇 前言 上一篇文章 (https://www.cnblogs.com/hunternet/p/9668851.html) 简单总结了分布式系 ...
- Cgroups 与 Systemd
Cgroups 是 linux 内核提供的一种机制,如果你还不了解 cgroups,请参考前文<Linux cgroups 简介>先了解 cgroups.当 Linux 的 init 系统 ...
- jdk1.8之线程中断
在Core Java中有这样一句话:"没有任何语言方面的需求要求一个被中断的程序应该终止.中断一个线程只是为了引起该线程的注意,被中断线程可以决定如何应对中断 " 线程中断不会使线 ...
- configure: error: cannot guess build type; you must specify one解决方法
原文地址:https://blog.csdn.net/hebbely/article/details/53993141 1.configure: error: cannot guess build t ...