0

I wrote a python script and using selenium driver. I am getting the below error:

    from selenium import webdriver
ModuleNotFoundError: No module named 'selenium'

When I run the command: pip install selenium, the output is:

Requirement already satisfied: selenium in d:\windows\system32\config\systemprofile\appdata\local\programs\python\python36\lib\site-packages
Requirement already satisfied: urllib3 in d:\windows\system32\config\systemprofile\appdata\local\programs\python\python36\lib\site-packages (from selenium)
You are using pip version 9.0.1, however version 19.3.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

Can you please help to resolve this.

DebanjanB
  • 118,661
  • 30
  • 168
  • 217
  • Does this answer your question? [How do I install pip on Windows?](https://stackoverflow.com/questions/4750806/how-do-i-install-pip-on-windows) – Naveen Nov 12 '19 at 09:20
  • How are you running the script that contains `from selenium import webdriver` – FlyingTeller Nov 12 '19 at 11:24

1 Answers1

0

This error message...

Requirement already satisfied: selenium in d:\windows\system32\config\systemprofile\appdata\local\programs\python\python36\lib\site-packages 
Requirement already satisfied: urllib3 in d:\windows\system32\config\systemprofile\appdata\local\programs\python\python36\lib\site-packages (from selenium) 
You are using pip version 9.0.1, however version 19.3.1 is available. 
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

...implies that you are using pip v9.0.1 which is pretty ancient. You need to update pip to the latest available version of pip v19.3.1 using the following command from the command prompt:

python -m pip install --upgrade pip
DebanjanB
  • 118,661
  • 30
  • 168
  • 217