After installing Selenium, run an error: ModuleNotFoundError: No module named 'selenium' solution

When setting up Selenium's web automatic test environment, Selenium was installed successfully, but an error was reported when writing the program: ModuleNotFoundError: No module named 'selenium', as shown in the following figure:

insert image description here
But there is another situation, if the interpreter path is correct, but there is no library, in fact, you can click the ["+"] sign on the [software package] in the upper left corner to search and install one. After seeing the Selenium library, you can click OK and go back to run the program. This time, there will be no error: ModuleNotFoundError: No module named 'selenium'. The above successfully solved the problem of running the program error: ModuleNotFoundError: No module named 'selenium'.
insert image description here

insert image description here

insert image description here

insert image description here

Guess you like

Origin blog.csdn.net/weixin_44996886/article/details/131136445