0

I am trying to install Scrapy.

I am getting this error. I know there are many questions exists on SO but none of a solution has worked for me.

    building 'twisted.test.raiser' extension
    error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat).

    ----------------------------------------
Command "c:\python34\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Mani\\AppData\\Local\\Temp\\pip-build-eav78sdn\\Twisted\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\Mani\AppData\Local\Temp\pip-19_gmj4b-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Mani\AppData\Local\Temp\pip-build-eav78sdn\Twisted\

I have these things installed in my computer

enter image description here

I have System Variable name:value is VS100COMNTOOLS:VS140COMNTOOLS

I also have OpenSSL installed in OpenSSL-Win64 and added to Windows PATH

I also have Microsoft Visual C++ Compiler for Python 2.7 installed.

What should I do? I have tried all solutions provided on SO but none worked.

Umair Ayub
  • 19,358
  • 14
  • 72
  • 146
  • 1
    _"I have tried all solutions provided on SO but none worked."_ Some links to prove that? – πάντα ῥεῖ Sep 16 '16 at 17:47
  • @πάνταῥεῖ http://stackoverflow.com/a/32006750/4094231 this one – Umair Ayub Sep 16 '16 at 18:03
  • @πάνταῥεῖ http://stackoverflow.com/a/27672491/4094231 this one too – Umair Ayub Sep 16 '16 at 18:04
  • @πάνταῥεῖ Someone on SO commented about upgrading PIP ... I did that too – Umair Ayub Sep 16 '16 at 18:04
  • You're using 3.4, so you need Visual Studio 2010 -- not Visual Studio 2013 and not VC++ for Python 2.7. If you can't obtain VS 2010, then update to use Python 3.5 with the latest Visual Studio 2015, community edition. – Eryk Sun Sep 16 '16 at 20:42
  • @eryksun what if I install Visual Studio 2010 Test Professional will that work? – Umair Ayub Sep 17 '16 at 10:17
  • If you really have to use 3.4, you could try building the extension using MinGW instead of Visual Studio. While you can't build Python itself with MinGW, it does allow building most extension modules. However, you may need to get a lot of help on forums to build everything you need. – Eryk Sun Sep 17 '16 at 10:26
  • Twisted is not yet supported on Windows with Python 3. Twisted is a requirement for Scrapy. [Twisted seems to be on its way to support Python 3 on Windows](http://labs.twistedmatrix.com/2016/08/twisted-1640-released.html) soon though: _"35+ more modules ported to Python 3, and many many cleanups on the way to Python 3 on Windows support."_ – paul trmbrth Sep 17 '16 at 14:50

1 Answers1

1

I got this working.

Usually these require very particular versions of the Visual studios C++ compiler. In this case, following the steps listed on this page for the "Microsoft Visual C++ 10.0 standalone: Windows SDK 7.1" worked for getting twisted running (which is the package that's screwing up in this case)

If that doesn't work, you can find unofficial wheels here (learn more on wheels in general here)

Download the correct wheel (in this case, twisted) and follow these instructions to install it.

Hope this helps.

Community
  • 1
  • 1
King_llama
  • 179
  • 2
  • 2
  • 12