这是因为Scrapy模块的版本不兼容所导致的。可以通过更新Scrapy来解决这个问题。方法如下:
pip uninstall scrapy
pip install --upgrade pip
pip install scrapy==2.4.1
import scrapy
现在,您应该能够成功运行脚本了。
上一篇:编写大型图像精灵表
下一篇:编写打印直角三角形的代码。每一行都有数字,每行末尾都是该行所有数字的和。