Im learning python. but i have no module named selenium error. here is my code:
from selenium import webdriver
from time import sleep
chromeOptions = webdriver.ChromeOptions()
chromeOptions.add_argument("--incognito")```
Im learning python. but i have no module named selenium error. here is my code:
from selenium import webdriver
from time import sleep
chromeOptions = webdriver.ChromeOptions()
chromeOptions.add_argument("--incognito")```
Ensure you have installed the selenium module. You can do so by running pip install selenium
in a system terminal/command prompt
In case you get the error ModuleNotFoundError: No module named 'selenium', you could try to manually import it. You should get the exact path of the 'selenium' in your device (for instance, by using the command pip install selenium
, you should see the following line: Requirement already satisfied: selenium in c:\users\Name...). Copy this path and use it in your python script:
import sys
sys.path.append('paste-here-your-path')
Then you can proceed with your code