1、安装好python2.7,将python.exe所在目录设置到系统环境变量的path项里边;
2、安装setuptools:由于不支持64位,直接下载安装貌似有问题,可以打开http://peak.telecommunity.com/dist/ez_setup.py,复制里边的内容保存到一个文本文件,假设为c:\ez_setup.py,然后在DOS窗口使用以下命令安装:python c:\ez_setup.py 回车;
3、安装pip:setuptoolssetuptools安装后,会在python安装目录下的lib\scripts里边生成easy_install.exe等文件,切换到这个目录,使用easy_install pip指令安装pip;
4、安装selenium:切换到python安装目录下的lib\scripts,使用pip install selenium进行安装即可(必须联网状态)
附ez_setup.py内容:
#!python
"""Bootstrap setuptools installation
If you want to use setuptools in your package's setup.py, just include this
file in the same directory with it, and add this to the top of your setup.py::
from ez_setup import use_setuptools
use_setuptools()
If you want to require a specific version of setuptools, set a download
mirror, or use an alternate download directory, you can do so by supplying
the appropriate options to ``use_setuptools()``.
This file can also be run as a script to install or upgrade setuptools.
"""
import sys
DEFAULT_VERSION = "0.6c11"
DEFAULT_URL = "http://pypi.python.org/packages/%s/s/setuptools/" % sys.version[:3]
md5_data = {
'setuptools-0.6b1-py2.3.egg': '8822caf901250d848b996b7f25c6e6ca',
,