ImportError:使用Scrapy时没有名为win32api的模块

李皓伟*_*李皓伟 24 python scrapy scrapy-spider

我是Scrapy的新学习者.我安装了python 2.7和所有其他所需的引擎.

然后我尝试按照教程http://doc.scrapy.org/en/latest/intro/tutorial.html构建一个Scrapy项目.

在抓取步骤中,我键入后scrapy crawl dmoz 生成此错误消息

ImportError: No module named win32api.
[twisted] CRITICAL : Unhandled error in deferred
Run Code Online (Sandbox Code Playgroud)

我正在使用Windows.

堆栈跟踪:

在此输入图像描述
我正在使用Windows.

Alf*_*wan 62

试试这个.

pip install pypiwin32

  • 这解决了我在Windows 10中的问题 (13认同)

GHa*_*jba 3

如果您在互联网上搜索一下,您会发现以下文档,其中描述了安装 Py32Win 所需执行的操作:http://www.feedbackward.com/content/scrapy_install.pdf

以下是您必须执行的所有步骤。我用这个文档做到了这一点,现在我的 Scrapy 安装可以在 Windows 上运行了。