安装Scrapy过程笔记

来源:互联网 发布:淘宝樱木花道家鞋真吗 编辑:程序博客网 时间:2024/05/16 06:24

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.csdn.net/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

(未完待续。。。)