How to install selenium (introduction to crawlers)

As we all knows, the first thing you have to do is ready for many models, especially for python.


Many friends failed to use import selenium from weddrivers, and then went crazy to update the matching version of Chromedriver, but all failed. After several hours of tossing, they found that pypiwin32(that is to say, if you want to install selenium, you must install it first. pypiwin32), the following are the solution steps:

1. Run cmd as an administrator to check the python installation and version.
Just enter python
2. Installing pypiwin32
first used this blogger's method, but it failed

Link To

find the reason, refer to the official website for the same method. The

official website link is


found to be the path of cmd, so simply reopen cmd directly.

cmd:Alt

it is okay! But it is reminded to update the python version, and enter it directly according to the code it provides.


3. Enter pip install pypiwin32

success


4. Enter pip install selenium

Fail again
After inquiring, it is found that the path has not been changed. The path has a great impact on python. A separate article will be opened later to talk about the problems and solutions.


The most reliable thing is Baidu experience!
Enter pip -V to install.


Successful installation


5. Test
PS with IDLE : I still want to transfer to pycharm later, and I will write another one as a memo.

It’s too early to be happy, I forgot to add path


Found that the code was wrong, but the path was also updated.

succeed

Guess you like

Origin blog.csdn.net/weixin_44616447/article/details/105155262