0

I'm rookie in python, try to install scrapy but here's what python return

Failed building wheel for lxml

here's the full msg.

Command "C:\Users\sande\AppData\Local\Programs\Python\Python35-32\python.exe -u -c "import setuptools, tokenize;file='C:\Users\sande\AppData\Local\Temp\pip-build-fisxcup_\lxml\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\sande\AppData\Local\Temp\pip-qzhtmsde-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\sande\AppData\Local\Temp\pip-build-fisxcup_\lxml\

There's few solution on StackOverflow, tried but still not work.

Here's what I tried

-m pip install wheel

success, but doesn't make any difference.

-m pip install twisted

Fail, here's what python return

error: Unable to find vcvarsall.bat

Failed building wheel for twisted

-m pip install python3-dev

Failed, here's the return

Could not find a version that satisfies the requirement python3-dev (from versions: ) No matching distribution found for python3-dev

I'm running out of idea, please kindly assist, thanks in advance.

Community
  • 1
  • 1
  • `install python3-dev`...? `pip` is not `apt-get` – OneCricketeer Nov 28 '16 at 19:51
  • hmm, I'm using Win10, maybe I have misunderstood. – Sander Chen Nov 28 '16 at 19:52
  • answer to installing lxml http://stackoverflow.com/questions/33027034/how-to-install-lxml-in-python-3-4-on-windows-machine – corn3lius Nov 28 '16 at 19:53
  • 1
    What are you doing with the `-m` flag? You should just be able to run `pip install ` for whatever you need. Your other error has already been addressed here. http://stackoverflow.com/questions/2817869/error-unable-to-find-vcvarsall-bat – OneCricketeer Nov 28 '16 at 19:53
  • For `-m` issue, it works before I uninstall the python without `-m`, but it doesn't work after I install it again. Thanks for the link, I'm checking that:) – Sander Chen Nov 28 '16 at 19:57
  • `vcvarsall.bat` is an annoying configuration file for Microsoft Visual Studio IDE. I remember having to kludge around or fake it out (just create an empty file); also, it has to be on your system PATH, you may need to edit that (from Control Panel). Read about workarounds for that. – smci Nov 28 '16 at 20:06
  • from scrapy `Python 3 is not supported on Windows. This is because Scrapy core requirement Twisted does not support Python 3 on Windows.` https://doc.scrapy.org/en/latest/intro/install.html – corn3lius Nov 28 '16 at 20:47
  • Thank you guys, I'm still fighting with that .bat.:( BTW, will you suggest to use Linux for coding? – Sander Chen Nov 28 '16 at 20:51

2 Answers2

1

From the scrapy website

I dont think your going to have success with python 3 and scrapy.

Python 3 is not supported on Windows. This is because Scrapy core requirement Twisted does not support Python 3 on Windows.

corn3lius
  • 4,857
  • 2
  • 31
  • 36
0

also from the scrapy website you could try installing it using anaconda (there's a py35 install), check this related answer

Community
  • 1
  • 1
Wilfredo
  • 1,548
  • 1
  • 9
  • 9