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:
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
4. Enter pip install selenium
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.
5. Test
PS with IDLE : I still want to transfer to pycharm later, and I will write another one as a memo.
Found that the code was wrong, but the path was also updated.