我有scrapy版本1.4和python 3.我正在尝试使用python进行scrapy,但是,每当我运行python3 script.py
时,我都会收到返回错误
File "script.py", line 2, in <module>
from scrapy import Spider
ModuleNotFoundError: No module named 'scrapy'
但是,进口低于
from __future__ import absolute_import
from scrapy import Spider
from scrapy.selector import Selector
from stack.items import StackItem
class StackSpider(Spider):
当我运行pip show scrapy
Name: Scrapy
Version: 1.4.0
Summary: A high-level Web Crawling and Web Scraping framework
...
答案 0 :(得分:1)
如果你想在python3中编码,你应该通过[run]
include = my_app/*
为python3安装scrapy
。