0

I have python Python 3.6.3. Tried to install scrapy using below pip command.

pip install Scrapy

I got error say to install Microsoft Visual 14. I have installed it. Then I got below error in my command prompt.

Due to limitation, I have given last few lines of error messages. I have already went though few posts in here. But those solutions is not worked for me.

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\

Simbu
  • 766
  • 1
  • 12
  • 37
  • 1
    Possible duplicate of [Running Cython in Windows x64 - fatal error C1083: Cannot open include file: 'basetsd.h': No such file or directory](https://stackoverflow.com/questions/23691564/running-cython-in-windows-x64-fatal-error-c1083-cannot-open-include-file-ba) – Amit Tripathi Dec 02 '17 at 10:38
  • 1
    Most of the time when I face an error I don't understand I copy the last two lines of the error and past it in google search box. It works 90% of the time and its much easier then asking the question on SO. – Amit Tripathi Dec 02 '17 at 10:40
  • 1
    it seems it needs `C/C++` compiler to compile it. There is ["Unofficial Windows Binaries for Python Extension Packages"](https://www.lfd.uci.edu/~gohlke/pythonlibs/). Probably `Scrapy` is on the list. – furas Dec 02 '17 at 14:45

1 Answers1

1

I have installed .Net framework and reinstalled Microsoft Viscal C++ 14v. This solved my issue.

vezunchik
  • 3,669
  • 3
  • 16
  • 25
Simbu
  • 766
  • 1
  • 12
  • 37