安装Scrapy时出错:未指定路径

时间:2017-04-14 14:49:34

标签: python scrapy

我最近发现scrapy是一个很好的抓取库,所以我试着在我的机器上安装scrapy,但是当我试着pip install scrapy它安装了一段时间并把这个错误扔给我..

error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools

error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools

    ----------------------------------------
Command "d:\pycharmprojects\environments\scrapyenv\scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\User\\AppData\\Local\\Temp\\pip-build-arbeqlly\\Twisted\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\User\AppData\Local\Temp\pip-jdj93131-record\install-record.txt --single-version-externally-managed --compile --install-headers d:\pycharmprojects\environments\scrapyenv\include\site\python3.5\Twisted" failed with error code 1 in C:\Users\User\AppData\Local\Temp\pip-build-arbeqlly\Twisted\

之后我去了this网站并安装了python的工具..

但在安装结束时得到这个:

warning: no previously-included files matching '*.misc' found under directory 'src\twisted'
warning: no previously-included files matching '*.bugfix' found under directory 'src\twisted'
warning: no previously-included files matching '*.doc' found under directory 'src\twisted'
warning: no previously-included files matching '*.feature' found under directory 'src\twisted'
warning: no previously-included files matching '*.removal' found under directory 'src\twisted'
warning: no previously-included files matching 'NEWS' found under directory 'src\twisted'
warning: no previously-included files matching 'README' found under directory 'src\twisted'
warning: no previously-included files matching 'topfiles' found under directory 'src\twisted'
warning: no previously-included files found matching 'src\twisted\topfiles\CREDITS'
warning: no previously-included files found matching 'src\twisted\topfiles\ChangeLog.Old'
warning: no previously-included files found matching 'codecov.yml'
warning: no previously-included files found matching 'appveyor.yml'
no previously-included directories found matching 'bin'
no previously-included directories found matching 'admin'
no previously-included directories found matching '.travis'
warning: no previously-included files found matching 'docs\historic\2003'
warning: no previously-included files matching '*' found under directory 'docs\historic\2003'
error: Setup script exited with error: [WinError 3] The system cannot find the path specified: 'C:\\Program Files\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.10.25017\\PlatformSDK\\lib'

任何帮助?

2 个答案:

答案 0 :(得分:2)

Scrapy文档现在建议使用Conda进行Windows安装:

https://doc.scrapy.org/en/latest/intro/install.html#windows

答案 1 :(得分:1)

如果您没有安装Windows SDK,则会出现此错误。

使用Build Tools或Visual Studio进行编译时,通常需要C ++编译器和Windows SDK。在构建工具中,有一个" Custom"安装选项,使您可以选择安装C ++和Windows SDK。在Visual Studio中,您必须修改安装以安装Windows SDK。

相信您需要与您正在使用的平台相对应的SDK(Windows 10 SDK for Windows 10等)。