本篇主要介绍如何在Windows下如何安装scrapy
环境:Win10(64位), Python3.6(64位)
打开命令行窗口,确认Python和pip被正确安装
python -V
pip -V
安装wheel
pip install wheel
安装Twisted
pip install Twisted
安装lxml
pip install lxml
安装pypiwin32
pip install pypiwin32
安装Scrapy
pip install scrapy
安装过程中出现一些问题
Running setup.py bdist_wheel for Twisted ... error
Failed building wheel for Twisted
File "c:\users\hutonm\appdata\local\programs\python\python36\lib\site-packages\pip\compat\__init__.py", line 73, in console_to_str
return s.decode(sys.__stdout__.encoding)
解决办法:
在官网下载具体的Twisted文件,然后进行安装
百度搜索:python extension packages for windows
pip3.6 install C:\Users\Hutonm\Downloads\Twisted-17.9.0-cp36-cp36m-win_amd64.whl