-1

I have installed selenium in Ubuntu and by writing this code

from selenium import webdriver
driver = webdriver.chrome()
driver.get("https://google.com")

I have got this output

ImportError: cannot import name webdriver

What should I do?

deadshot
  • 8,881
  • 4
  • 20
  • 39

1 Answers1

0

Selenium is clearly found but wedbdriver can't be imported. My guess is that you have a file called selenium too, in which case you should name it something else, because python tries to import webdriver from that file rather than the selenium package

Pani
  • 1,317
  • 1
  • 14
  • 20