scrapy fail to cooperate with python3.7

牧云@^-^@ 提交于 2020-02-05 11:57:10

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!