简体   繁体   English

scrapy无法与python3.7合作

[英]scrapy fail to cooperate with python3.7

I failed to install twisted by pip command, so I manually downloaded the .whl file and got it installed( version 18.7.0). 我无法通过pip命令安装twis​​ted,所以我手动下载了.whl文件并安装了它(版本18.7.0)。 Only after i did that, my laptop could install scrapy; 只有在我这样做之后,我的笔记本电脑才能安装scrapy; however, it seems that the twisted package is not compatible with python 3.7 and it keeps saying "syntax error" 然而,似乎扭曲的包与python 3.7不兼容并且它一直说“语法错误”

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. 我已经尝试在Github上发布了一些关于这个问题的方法( https://github.com/scrapy/scrapy/issues/3143 ),但没有一个解决它。 I wonder whether I need to shift to python 3.6 or not? 我想知道是否需要转换到python 3.6? cause my python spider can only setup it's downloader and cannot parse webpages 因为我的python spider只能设置它的下载器并且无法解析网页

Could anyone please give me some advise? 有人可以给我一些建议吗?

Yes. 是。 Twisted does not yet support Python 3.7. Twisted尚不支持Python 3.7。 Try Python 3.6 or earlier. 试试Python 3.6或更早版本。

该问题的评论之一帮助了我:

pip install git+https://github.com/scrapy/scrapy@master --no-dependencies --upgrade

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM