windows下安装scrapy

安装scrapy前需要安装wheel、lxml、Twisted、pywin32,最后再安装scrapy

1. 更新pip

On Windows :
python -m pip install -U pip

2. 安装wheel、lxml、Twisted、pywin32

1)lxml这个库是用来做xpath提取的
pip install lxml

2)安装wheel
pip install wheel

3)安装Twisted
在这个网址中下载合适的Twisted文件
网站比较乱,建议使用快捷搜索ctrl + f搜索Twisted

Twisted?19.2.0?cp27?cp27m?win32.whl
Twisted?19.2.0?cp27?cp27m?win_amd64.whl
Twisted?19.2.0?cp35?cp35m?win32.whl
Twisted?19.2.0?cp35?cp35m?win_amd64.whl
Twisted?19.2.0?cp36?cp36m?win32.whl
Twisted?19.2.0?cp36?cp36m?win_amd64.whl
Twisted?19.2.0?cp37?cp37m?win32.whl
Twisted?19.2.0?cp37?cp37m?win_amd64.whl

其中 cp27 是指 python2.7版本, cp36是指python3.6版本,下载和自己电脑对应python版本, 32位的和64位的文件都试一下
管理员模式运行cmd,使用cd 下载文件的路径 指令,到这个路径下
使用pip install Twisted?19.2.0?cpxx.....安装下载的文件
出现Twisted-19.2.0-cp36-cp36m-win32.whl is not a supported wheel on this platform.表示不支持,尝试其它文件

windows下安装scrapy

上一篇:c#实现php的http_build_query功能


下一篇:E - Capitalism(求差值最大。”=“情况的差分约束)