问题
I failed to install twisted by pip command, so I manually downloaded the .whl file and got it installed( version 18.7.0). Only after i did that, my laptop could install scrapy; however, it seems that the twisted package is not compatible with python 3.7 and it keeps saying "syntax error"
I have tried some method posted on the Github about this issue(https://github.com/scrapy/scrapy/issues/3143), but none of them solve it. I wonder whether I need to shift to python 3.6 or not? cause my python spider can only setup it's downloader and cannot parse webpages
Could anyone please give me some advise?
回答1:
Yes. Twisted does not yet support Python 3.7. Try Python 3.6 or earlier.
回答2:
One of the comments from the issue helped me:
pip install git+https://github.com/scrapy/scrapy@master --no-dependencies --upgrade
来源:https://stackoverflow.com/questions/51939334/scrapy-fail-to-cooperate-with-python3-7