1. Open the command window, go to Scripts in the Python installation directory, enter the command: pip install selenium and press Enter
2. The installation is successful, as shown in the following figure, check the version of selenium: pip show selenium
3. When importing selenium's webdriver in Pycharm, an undefined error will appear (Pycharm cannot reference the local library)
Click File, select Settings
Enter the setting and select python.exe under the locally installed Python path, so that Pycharm can reference the local library
Go back to the project, import webdriver and no error will be reported