Steps to check and fix the issue:
- Verify that python is installed using "python --version".
- Verify that pip is installed using "python -m pip --version".
- Check PATH Environment variable. Right-click on "This PC" or "My computer" and select properties. click on "Advanced system settings" and then click on "Environment Variables".
- Under the "System variables" find path and then click on edit.
- Add the location of python and python\scripts. (See picture 1).
picture 1
- Install selenium using "pip install selenium".
If you get the error again, try to reinstall python and pip. Make sure you set the path variable correctly. To reinstall python and pip, please read this doc