- pip install -i https://pypi.douban.com/simple/ scrapy
将会报错:error: Unable to find vcvarsall.bat
查询知道是没有安装 C 语言的环境,需要下载 VS。
第二种解决方案是自己下载 Twisted :http://www.lfd.uci.edu/~gohlke/pythonlibs/
下载和自己 Python 版本一致的文件:Twisted-17.9.0-cp35-cp35m-win_amd64.whl
# 然后 pip install 上面文件的地址
Installing collected packages: Twisted
Successfully installed Twisted-17.9.0
安装成功!
之后继续安装 scrapy!
# 使用豆瓣镜像安装
pip install -i https://pypi.douban.com/simple/ scrapy
Installing collected packages: scrapy
Successfully installed scrapy-1.4.0
2.后续问题:
scrapy shell http://blog.jobbole.com/112589/
报错:ImportError: No module named ‘win32api’
原因是缺少 win32
需要下载对应文件。http://sourceforge.net/projects/pywin32/files/