1

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?

2 Answers 2

5

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.

Sign up to request clarification or add additional context in comments.

Comments

-1

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.