close

[Solved] Import: cannot import name ‘webdriver’

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error Import: cannot import name ‘webdriver’ in python. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How Import: cannot import name ‘webdriver’ Error Occurs?

Today I get the following error Import: cannot import name ‘webdriver’ in python.

How To Solve Import: cannot import name ‘webdriver’ Error ?

  1. How To Solve Import: cannot import name 'webdriver' Error ?

    To Solve Import: cannot import name 'webdriver' Error If your file name is selenium.py, change it to something else and delete .pyc files or the __pycache__ directory if exists.

  2. Import: cannot import name 'webdriver'

    To Solve Import: cannot import name 'webdriver' Error If your file name is selenium.py, change it to something else and delete .pyc files or the __pycache__ directory if exists.

Solution 1

If your file name is selenium.py, change it to something else and delete .pyc files or the __pycache__ directory if exists.

If you do not have the selenium, you should install the selenium by using pip or pipenv:

pip install selenium

Solution 2

It says that webdriver cant be import.So I assume you have Selenium installed.

So I can only assume that the selenium lied in different place in your path.

Maybe you have accidently create a file named selenium ?

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read