我有python Python 3.6.3。尝试使用下面的pip命令安装scrapy。
pip install Scrapy
我收到错误说要安装Microsoft Visual 14.我已安装它。然后我在命令提示符下面出现以下错误。
由于限制,我提供了最后几行错误消息。我已经在这里发了几篇帖子。但those solutions对我没用。
copying src\twisted\internet\test\fake_CAs\thing2.pem -> build\lib.win-amd64-3.6\twisted\internet\test\fake_CAs
copying src\twisted\mail\test\rfc822.message -> build\lib.win-amd64-3.6\twisted\mail\test
copying src\twisted\python\test\_deprecatetests.py.3only -> build\lib.win-amd64-3.6\twisted\python\test
copying src\twisted\words\im\instancemessenger.glade -> build\lib.win-amd64-3.6\twisted\words\im
copying src\twisted\words\xish\xpathparser.g -> build\lib.win-amd64-3.6\twisted\words\xish
running build_ext
building 'twisted.test.raiser' extension
creating build\temp.win-amd64-3.6
creating build\temp.win-amd64-3.6\Release
creating build\temp.win-amd64-3.6\Release\src
creating build\temp.win-amd64-3.6\Release\src\twisted
creating build\temp.win-amd64-3.6\Release\src\twisted\test
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DWIN32=1 -Ic:\python36\include -Ic:\python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" /Tcsrc/twisted/test/raiser.c /Fobuild\temp.win-amd64-3.6\Release\src/twisted/test/raiser.obj
raiser.c
c:\python36\include\pyconfig.h(222): fatal error C1083: Cannot open include file: 'basetsd.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
----------------------------------------
Command "c:\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\KAVIG~1.LAP\\AppData\\Local\\Temp\\pip-build-u9d1gd5n\\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\KAVIG~1.LAP\AppData\Local\Temp\pip-mhpbb97y-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\KAVIG~1.LAP\AppData\Local\Temp\pip-build-u9d1gd5n\Twisted\
答案 0 :(得分:1)
我已经安装了.Net
框架并重新安装了Microsoft Viscal C++ 14v
。这解决了我的问题。