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

问题描述

我正在尝试在Windows 7上安装Scrapy.我正在按照以下说明进行操作:

I'm trying to install Scrapy on windows 7. I'm following these instructions:

http://doc.scrapy.org/en/0.24/intro/install.html#intro-安装

我已按照本教程 https://adesquared.wordpress.com/2013/07/07/setting-up-python-and-easy_install-on-windows-7/,然后按上述设置环境变量,但是当我尝试在命令提示符下运行python时,出现此错误:

I’ve downloaded and installed python-2.7.5.msi for windows following this tutorial https://adesquared.wordpress.com/2013/07/07/setting-up-python-and-easy_install-on-windows-7/, and I set up the environment variables as mentioned, but when I try to run python in my command prompt I get this error:

Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\>python
‘python’ is not recognized as an internal or external command,
operable program or batch file.

C:\> python ez_setup.py install
‘python’ is not recognized as an internal or external command,
operable program or batch file.

C:\>

您能帮我解决这个问题吗?

Could you please help me solve this?

推荐答案

ur是python2语法,您正在尝试安装不兼容软件包专用于python2,而不是python3:

ur is python2 syntax you are trying to install an incompatible package meant for python2 not python3:

_ajax_crawlable_re = re.compile(ur'<meta\s+name=["\']fragment["\']\s+content=["\']!["\']/?>')
                                 ^^ python2 syntax

默认情况下,python3.4还安装了pip

Also pip is installed by default for python3.4

这篇关于在Windows 7上安装Scrapy-Python和Easy_install的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 14:09