winows python2.7
安装
Scrapy
官方文档:
http://doc.scrapy.org/en/latest/intro/install.html#intro-install-platform-notes
需要提前安装的(官方文档)
:
The installation steps assume that you have the following things installed:
1. Python 2.7
2.
pip
and
setuptools
Python
packages.
Nowadays
pip
requires
and
installs
setuptools
if
not
installed. Python 2.7.9 and later include pip by default, so you may have it already.
3.
lxml.
Most
Linux
distributions
ships
prepackaged
versions
of
lxml.
Otherwise
refer
to
http://lxml.de/installation.html
4. OpenSSL. This comes preinstalled in all operating systems, except Windows where the Python
installer ships it bundled.
1. Python
已经安装了
2.7.11
版本。
2. pip and setuptools
因为是
Python2.7.9
之后的版本,默认已经安装了
pip
了,不过,后面有提示,安装的
pip
版本过低,然后会提示你更新
pip
版本的命令:
python -m pip install --upgrade pip
更新完为
8.1.1
版本。
3. lxml
下载
官网:
https://pypi.python.org/pypi/lxml/3.3.1
找对应的下载包,我这是
win32-py2.7.exe
的包。下载完双击安装就行。
4. OpenSSL
下载地址:
https://launchpad.net/pyopenssl
这里找了个
win32-py2.7.msi
下载,也是双击安装就行。
Windows
下安装
Scrapy
1.
添加环境变量
先把
Python27
以及它的
Scripts
目录添加到
PATH
的环境变量中。
C:\Python27\;C:\Python27\Scripts\;
2.
测试
在命令提示符中运行以下命令,看环境变量是否成功添加
python --version
3.
安装
pywin32
下载地址:
http://sourceforge.net/projects/pywin32/
因为之前要把
python
项目打包成
exe
文件,所以已经安装了
pywin32
了。
python2.7
的也可以这里下载:
http://download.csdn.net/download/lanlandechong/4367925