Python+selenium Environment Construction

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.