Construction of Python environment and installation of selenium under Windows system

Source: Internet
Author: User

1. First visit http://www.python.org/download/to download the latest version of Python;

2. Download the installation package, the installation is complete;

3. Add the installation directory of the computer to the environment variable, add the Python installation directory to the path system variable;

4. Test whether the Python installation is successful, cmd open command line input python command;

3.4.3 version, to use this notation print (' Hello world! '), you need to enclose the string in parentheses;

5. View the installed version;

Note: The above indicates that the Python installation is successful and the path configuration is ok!

6.SetupTools and PIP tools are installed, both of which are Python's third-party toolkit software, somewhat similar to Linux installation package software, but Pip is more powerful than the Setuptools feature.

Setuptools official explanation: Download, build, install, upgrade, and uninstall Python packages--easily!

PIP Official Explanation: A tool for installing and managing Python packages.

On the official website of Python can find setuptools download, here Windows only provides 32bit download, Setuptools-0.6c11.win32-py2.7.exe, directly double-click installation.

CMD into command line: Easy_install PIP is installed online.

Note: After installing Setuptools, you can see the script directory under the Python installation directory, as shown in:

After this directory is generated, you need to add path:c:\python27\scripts to the system environment variables before you can install the PIP online using the easy_install command in the command.

(Note: Environment variables, I installed the Python version 3.4.3, the environment variable path has been automatically added to these two environment variables, pay attention to see!) )

7.Selenium installation;

Python and selenium need to be combined, but selenium also provides a python-based implementation, so you'll need to install the selenium package into the Python library so that it can be called when Python is developed.

Tap cmd, go to the command window, go to D:\Python34\Scripts, enter command line: Pip install Selenium, after execution, will automate the search for the latest selenium version to download and install, as shown in:

The above shows that the online installation selenium successful!

8.python+selenium's sample;

Construction of Python environment and installation of selenium under Windows system

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.