本文介绍了无法在 Windows 上设置 Scrapy的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试按照 http://中描述的步骤在 Windows 7 上设置 Scrapydoc.scrapy.org/en/latest/intro/install.html .在我的 PC 上安装了 Python 3.5.1.尽管 Scrapy 不支持此 python 版本,但它已使用最新的 Anaconda 成功安装,但无法运行蜘蛛脚本.我发现 Scrapy 只适用于 Python 3.3.+ 版本,所以卸载 3.5.1 版,卸载 Anaconda,安装 python 3.3.5,安装 pywin32 并安装 pip.pip 失败 pip install Scrapy,所以我安装 Anaconda 并运行 conda install -c scrapinghub scrapy Scrapy 已安装,但我看到安装的 libs 是针对 python 3.5 的,例如:刮削:1.1.0-py35_0

I tried to setup Scrapy on Windows 7 by steps described at http://doc.scrapy.org/en/latest/intro/install.html . On my PC was installed Python 3.5.1. Although Scrapy not support this python version it was installed successfully with latest Anaconda but fails to run spider script. I find that Scrapy only works with Python 3.3.+ version so uninstall version 3.5.1, uninstall Anaconda, install python 3.3.5, install pywin32 and install pip. pip fails pip install Scrapy, so I install Anaconda and run conda install -c scrapinghub scrapy Scrapy installed, but I saw that libs installed was for python 3.5 like: scrapy: 1.1.0-py35_0

现在我运行

c:\python\olxscrapy>scrapy crawl OlxCatalogSpider

并得到错误

  File "C:\Anaconda3\lib\site-packages\twisted\internet\stdio.py", line 30, in
module>
    from twisted.internet import _win32stdio
ImportError: cannot import name '_win32stdio'

如何让 Scrapy 在 python 3.3.+ 下运行

How to make Scrapy run with python 3.3.+

推荐答案

在这个博客上:

https://blog.scrapinghub.com/2016/05/25/data-extraction-with-scrapy-and-python-3/

它说 Python 3 上的 Scrapy 还不能在 Windows 环境中运行

it says Scrapy on Python 3 doesn't work in Windows environments yet

我最近在 Ubuntu 上为 Python 3.5 安装了 scrapy 并收到了很多错误.错误在sudo apt-get install python3.5-dev"之后停止.

I recently installed scrapy on Ubuntu for Python 3.5 and received a lot of errors. The errors stopped after: "sudo apt-get install python3.5-dev".

这篇关于无法在 Windows 上设置 Scrapy的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-18 11:42