The preparation tools are as follows:
Download Python "Python Development Environment" http://python.org/getit/
Download Setuptools "Python's Basic Package tool" Http://pypi.python.org/pypi/setuptools
Download Pip "Python's installation package management tool" Https://pypi.python.org/pypi/pip
Setuptools is a Python-based package tool that can help us easily download, build, install, upgrade, and uninstall Python packages.
Pip is a Python software package installation and management tool, with this tool, we only need a command to be able to easily python any class library.
Windows Environment Installation
The first step, install the Python development environment package, the installation directory is: C:\Python27.
Adding environment variables
Modify My Computer, properties, advanced-environment variable--the path in the system variable is:
Variable name: PATH
Variable value:; C:\Python27; C:\Python27\Scripts;
Step two, install Setuptools
I unzipped it in the C:\setuptools-1.3 directory by default.
Go to the Windows command prompt (Start-run--cmd command, enter) to execute ez_setup.py:
C:\setuptools-1.3>pythone z_setup.py
Step three, install Pip
I unzipped it in the C:\pip-1.4.1 directory by default.
Enter the C:\pip-1.4.1 directory:
C:\pip-1.4.1>python setup.py Install
Then switch to the C:\Python27\Scripts directory to enter:
C:\python27\scripts>easy_install pip
Fourth Step, install selenium
If the computer is connected, you can enter the command installation directly under C:\Python27\Scripts:
C:\python27\scripts>pip Install-u Selenium
If you do not have a network, you can download the installation: Selenium:https://pypi.python.org/pypi/selenium download selenium-3.0.2.tar.gz (MD5), and unzip the entire directory into C : \python27\lib\site-packages directory, and then use the command:
C:\python27\lib\site-packages\selenium-3.0.2>python setup.py Install
Fifth Step verification is successful
Enter in Python interactive mode: From selenium import webdriver If no error is indicated after carriage return, the selenium installation is successful.
Python+selenium Environment Construction