error: Setup script exited with error: Microsoft Visual C++ 9.0 is required (Unable to find vcvarsall.bat). Get it from
http://aka.ms/vcpython27
解决办法的前提是,系统中必须安装了vs的相关版本。
For Windows installations:
While running setup.py for package installations, Python 2.7 searches for an installed Visual Studio 2008. You can trick Python to use a newer Visual Studio by setting the correct path in VS90COMNTOOLS environment variable before calling setup.py.
If you have Visual Studio 2010 installed, execute
SET VS90COMNTOOLS=%VS100COMNTOOLS%
or with Visual Studio 2012 installed (Visual Studio Version 11)
SET VS90COMNTOOLS=%VS110COMNTOOLS%
or with Visual Studio 2013 installed (Visual Studio Version 12)
SET VS90COMNTOOLS=%VS120COMNTOOLS%
9、检查安装
打开一个cmd窗口,在任意位置执行scrapy命令,得到下列页面,表示环境配置成功。
Scrapy 0.24.4 - no active project
Usage:
scrapy [options] [args]
Available commands:
bench Run quick benchmark test
fetch Fetch a URL using the Scrapy downloader
runspider Run a self-contained spider (without creating a project)
settings Get settings values
shell Interactive scraping console
startproject Create new project
version Print Scrapy version
view Open URL in browser, as seen by Scrapy
[ more ] More commands available when run from project directory