Scrapy on Windows XP ImportError: No module named w3lib.html

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8292379/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 18:32:35  来源:igfitidea点击:

Scrapy on Windows XP ImportError: No module named w3lib.html

pythonwindowsscrapy

提问by Sam Stoelinga

I just tried installing and running scrapy on my PC at work, which runs Windows XP.

我只是尝试在工作时在运行 Windows XP 的 PC 上安装和运行 scrapy。

If I run scrapy startproject myproject I will get the following error:

如果我运行 scrapy startproject myproject 我将收到以下错误:

ImportError: No module named w3lib.html

Wining: It's really troublesome running Python / Scrapy on windows XP. On linux I just run pip install Scrapy and it's ok lol.

Wining:在windows XP上运行Python/Scrapy真的很麻烦。在 linux 上,我只运行 pip install Scrapy 就可以了,哈哈。

回答by Eryk Sun

It appears they forgot to list w3lib and simplejson. The latter is only required for Python versions before 2.6. Here's an installer for Distribute, in case you don't have easy_install and pip. Then you can use one of the latter to get the remaining dependencies.

看来他们忘记列出 w3lib 和 simplejson。只有 2.6 之前的 Python 版本才需要后者。这是Distribute的安装程序,以防您没有 easy_install 和 pip。然后您可以使用后者之一来获取剩余的依赖项。

回答by Navi

use easy_install w3libworked for me

使用easy_install w3lib对我有用

回答by user1767754

If you have pip installed, on Mac & Linux:

如果您安装了 pip,在 Mac 和 Linux 上:

try:

尝试:

pip install w3lib

pip 安装 w3lib

if you have installed it with root before:

如果你之前用 root 安装过它:

sudo pip install w3lib

须藤 pip 安装 w3lib