Reputation: 75
The first thing I wanted to do is, installing Selenium in Windows and import webdriver from selenium.
So, I installed Selenium with pip install selenium and tried to import webdriver with:
from selenium import webdriver
But I got the error:
File "C:\Users\VIJAY\Desktop\selenium.py", line 2, in from selenium import webdriver ImportError: cannot import name 'webdriver'
Where am I going wrong?
Upvotes: 1
Views: 4195
Reputation: 3
Change your program name to something else like scraping if you are practicing it. Or else try installing it from the python console.
import selenium
from selenium import webdriver
Upvotes: -1
Reputation: 6748
Rename your file from selenium.py to something else. Also, make sure there is nothing named selenium in your desktop folder. You are probably not importing the library, but rather a python file.
Upvotes: 5