安装Scrapy过程笔记

python 

查看python的版本及其详细信息


python -m pip install --upgrade pip 

升级pip


python -m pip install lxml 

安装lxml    lxml是一种使用 Python 编写的库,可以迅速、灵活地处理 XML。


python -m pip install setuptools

安装setuptools  一般都已经安装了的,可在cmd中用 python -m pip list 查看是否已经安装


python -m pip install zope.interface

安装zope.interface


python -m pip install Twisted

Twisted是用Python实现的基于事件驱动的网络引擎框架。


python -m pip install pyOpenSSL

pyOpenSSL是Python的OpenSSL接口


https://sourceforge.net/projects/pywin32/files/pywin32/

提供win32api,安装过程:http://blog.youkuaiyun.com/qq_34369025/article/details/53687900


easy_install w3lib

安装w3lib


easy_install parsel

安装parsel


easy_install scrapy

安装Scrapy,安装后在cmd命令行输入scrapy看是否安装成功


安装的第三方库位于  E:\Python\Python35\Lib\site-packages


安装Twisted出现error:Unable to find vcvarsall.bat 

解决方法:https://www.zhihu.com/question/26857761


此时import scrapy 成功,但是创建目录 scrapy startproject tutorial 时报错:

报错:pkg_resources.DistributionNotFound: The 'queuelib' distribution was not found and is required by scrapy

解决方法:easy_install queuelib

如出现:error: The read operation timed out,检查下开头是否有空格


报错:pkg_resources.DistributionNotFound: The 'pyasn1-modules' distribution was not found and is required by service-identity

解决方法:easy_install pyasn1-modules


此时 scrapy startproject tutorial 成功创建目录


ImportError: No module named 'PIL'

easy_install image


https://jingyan.baidu.com/article/14bd256e748346bb6d2612be.html

(未完待续。。。)



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值