ImportError:没有名为misc.log的模块

时间:2016-01-05 15:39:14

标签: python python-2.7 scrapy scrapy-spider

我尝试从https://github.com/geekan/scrapy-examples

运行示例“scrapy”

当我尝试运行项目'alexa'时,我收到错误: ImportError: misc.log error

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

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

2 个答案:

答案 0 :(得分:0)

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

答案 1 :(得分:0)

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

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