Scrapy在window下的安装方法
通过自己的实践和理解翻译了官方安装方法
After installing Python, follow these steps before installing Scrapy:
#安装完Python以后通过以下步骤来安装 Scrapy:
add the C:python27Scripts and C:python27 folders to the system path by adding those directories to the PATH environment variable from theControl Panel.
#把C:/python27/Scripts 和 C:/python27 添加洗系统环境变量
install OpenSSL by following these steps:
#通过以下步骤来安装OPENSSL
go to Win32 OpenSSL page #访问Win32 OpenSSL官网
download Visual C++ 2008 redistributables for your Windows and architecture
#下载安装Visual C++ 2008 redistributables
download OpenSSL for your Windows and architecture (the regular version, not the light one)
#下载安装OPENSSL在你的系统上
add the c:openssl-win32bin (or similar) directory to your PATH, the same way you added python27 in the first step“ in the first step
#用添加Python环境变量一样的方法把OPENSSL所在目录添加到你的系统环境变量里
some binary packages that Scrapy depends on (like Twisted, lxml and pyOpenSSL) require a compiler available to install, and fail if you don’t have Visual Studio installed. You can find Windows installers for those in the following links. Make sure you respect your Python version and Windows architecture.
#Scrapy按照时需要有 Twisted, lxml 和 pyOpenSSL 如果你没有安装 Visual Studio 你可以寻找和你的python版本和系统版本一致的Windows architecture
pywin32: http://sourceforge.net/projects/pywin32/files/
#下载安装与你的python版本和系统版本一致的pywin32
Twisted: http://twistedmatrix.com/trac/wiki/Downloads
#下载安装于你的python版本和系统版本一致的Twisted
zope.interface: download the egg from zope.interface pypi page and install it by running easy_install file.egg
#下载zope的.egg 文件,然后CMD命令行进入到.egg文件所在目录安装.egg文件:
c:zope> python easy_install [filename].egg
lxml: http://pypi.python.org/pypi/lxml/
#下载安装于你的python版本和系统版本一致的lxml
pyOpenSSL: https://launchpad.net/pyopenssl
#下载安装与你的python版本和系统版本一致的pyOpenSSL.egg,安装方法和上面安装zope 的egg文件一致
通过以上的步骤你的系统已经具备了安装Scrapy的环境,接下来通过以下命令开始安装Scrapy:
c:scrapy>easy_install Scrapy
安装完成以后查看scrapy版本
c:scrapy>Scrapy version
至此,恭喜你Scrapy可以在你的windows系统上运行了