I have scrapy version 1.4 and python 3. I am trying to use scrapy with python, however, whenever I run python3 script.py
, I get a return error
File "script.py", line 2, in <module>
from scrapy import Spider
ModuleNotFoundError: No module named 'scrapy'
However, the imports are below
from __future__ import absolute_import
from scrapy import Spider
from scrapy.selector import Selector
from stack.items import StackItem
class StackSpider(Spider):
When I run pip show scrapy
Name: Scrapy
Version: 1.4.0
Summary: A high-level Web Crawling and Web Scraping framework
...
如果要在python3中进行编码, pip3 install scrapy
通过pip3 install scrapy
install scrapy
为python3 pip3 install scrapy
。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.