ImportError: No module named misc.log

ImportError: No module named misc.log

我尝试 运行 来自 https://github.com/geekan/scrapy-examples

的示例 "scrapy"

当我尝试 运行 项目 'alexa' 时出现错误: ImportError: misc.log error

我应该在哪里寻找 'misc.log'?

from alexa.items import *
from misc.log import *

misc module 也与模块 alexa 在同一目录中。您可能单独下载了 alexa 并正在尝试 运行 它。而此模块依赖于其他模块。所以你可以做的是使用 git clone https://github.com/geekan/scrapy-examples.git 从 github 中提取整个项目,然后 运行 示例,这样示例模块就可以找到它们需要的模块 运行.

模块 misc.log 是 geekan 存储库中的 log.py in the folder misc

尝试 运行 目录 scrapy-examples 中的 alexa spider,以便脚本可以找到 misc.log 模块。当然,这是假设您已经在您的计算机中克隆了完整的存储库。