Get the App
SLTechnology News&Howtos  ›  Servers  › 

Python+selenium environment building

Shulou Source: shulou.com Published: 2022-06-02 06:52:33 10月04日 Update

1. Install python

Download address: https://www.python.org/downloads/ download and click install. Check: Add Python X.X to PATH during installation to add to the environment variable for subsequent use.

Verification after installation: after the installation is complete, you can open the cmd command line tool and enter: python-- version. The installed python version will be printed after the installation is successful.

2. Install selenium webdriver

Enter the command line directly: pip install selenium. If you don't add an environment variable, you need to install the python directory and open the command line tool to execute.

3. Download chromedriver.exe to the Google browser installation directory, and add the Google browser installation directory to the environment variable to restart the computer.

4. After the completion of the above three steps, the environment is built successfully. Create a new python file to check whether the environment has been built.

From selenium import webdriverdr = webdriver.Chrome ()

If the construction is successful, Google browser will be opened automatically.

Tags: Environment success variables commands browser directory browse tools input at the same time address file version computer X.X top three check verify Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux OPPO Reno Shulou Technology Microsoft NVidia