ModuleNotFoundError: No module named 'webdriver_manager' error even after installing webdrivermanager
Asked Answered
W

15

35

I've installed webdrivermanager on my system

C:\Users\username>pip install webdrivermanager
Requirement already satisfied: webdrivermanager in c:\python\lib\site-packages (0.8.0)
Requirement already satisfied: lxml in c:\python\lib\site-packages (from webdrivermanager) (4.5.1)
Requirement already satisfied: requests in c:\python\lib\site-packages (from webdrivermanager) (2.20.1)
Requirement already satisfied: tqdm in c:\python\lib\site-packages (from webdrivermanager) (4.46.1)
Requirement already satisfied: appdirs in c:\python\lib\site-packages (from webdrivermanager) (1.4.4)
Requirement already satisfied: BeautifulSoup4 in c:\python\lib\site-packages (from webdrivermanager) (4.6.0)
Requirement already satisfied: certifi>=2017.4.17 in c:\python\lib\site-packages (from requests->webdrivermanager) (2018.11.29)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in c:\python\lib\site-packages (from requests->webdrivermanager) (3.0.4)
Requirement already satisfied: idna<2.8,>=2.5 in c:\python\lib\site-packages (from requests->webdrivermanager) (2.7)
Requirement already satisfied: urllib3<1.25,>=1.21.1 in c:\python\lib\site-packages (from requests->webdrivermanager) (1.23)

Still whenever I am trying to use webdrivermanager I'm facing an error.

  • Code Block:

    from selenium import webdriver
    from webdriver_manager.chrome import ChromeDriverManager
    
    driver = webdriver.Chrome(executable_path=ChromeDriverManager().install())
    driver.get('https://www.google.com/')
    
  • Console Output:

    C:\Users\username\Desktop\Debanjan\PyPrograms>webdriverManagerChrome.py
    Traceback (most recent call last):
      File "C:\Users\username\Desktop\Debanjan\PyPrograms\webdriverManagerChrome.py", line 2, in <module>
        from webdriver_manager.chrome import ChromeDriverManager
    ModuleNotFoundError: No module named 'webdriver_manager'  
    

Can someone help me, if I'm missing something?

Incase it adds any value, I'm using

Whitleather answered 14/8, 2020 at 23:21 Comment(1)
webdrivermanager and webdriver-manager - are different libraries. Your code is from webdriver-manager library, which has two aliases: webdriver_manager & webdriver-manager and could be installed by any of them.Mammillary
P
77

Update (thanks to Vishal Kharde)

The documentation now suggests:

pip install webdriver-manager

Solution:

Install it like that:

pip install webdriver_manager

instead of pip install webdrivermanager.

Requirements:

The newest version, according to the documentation supports python 3.6 or newer versions:

enter image description here

Reference: https://pypi.org/project/webdriver-manager/

Picky answered 15/8, 2020 at 1:1 Comment(1)
If using conda, this worked conda install webdriver-managerRugged
G
12

First install webdriver manager using the following command in command prompt opened from the python file path.

pip install webdriver-manager.

Next open your pycharm tool and go to settings -> project interpreter -> and click on + icon and search for webdriver-manager and install that.

And run the below code:

from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager

driver = webdriver.Chrome(ChromeDriverManager().install()) 
Gothar answered 10/12, 2020 at 14:43 Comment(0)
O
8

You can try this

py -3 -m pip install webdriver_manager

Opia answered 25/4, 2022 at 15:27 Comment(0)
C
2

This worked for me:

python3 -m pip install webdriver-manager

I'm on windows so I'll leave this incase it helps anyone.

Cudgel answered 21/1, 2021 at 22:44 Comment(0)
N
2

I found that this one worked for me so:

pip3 install webdrivermanager

Not sure if it'll help anyone, but pip3 works better than normal pip as it installs correct dependencies

Noble answered 16/3, 2021 at 8:2 Comment(1)
This is another library ;) with irrelevant to topic-starter's code.Mammillary
C
2

some times just restarting your code editor can be the ultimate solution that is what worked for me after spending 2 hours on the web trying to find out why the webdriver_manager is not picked up by python

use this to install

pip install webdriver_manager

and then restart your VScode if that is what you are using as a code editor I don't know why I have to but it worked the time waste.

Casas answered 16/12, 2021 at 3:3 Comment(0)
I
2

for newer selenium versions, install package "webdriver-manager" from pycharm IDE

1

Interracial answered 4/8, 2022 at 19:15 Comment(0)
R
1

It is an installation error.

It can be solved by:

pip install webdriver_manager

Reel answered 11/12, 2021 at 11:3 Comment(0)
C
1

If you are using chromium browser for execution then you can:

  1. Install webdriver with following command:
pip install webdriver-manager
  1. When importing in your python file you should use:
from webdriver_manager.**core**.utils import ChromeType
Chandos answered 11/2, 2023 at 17:36 Comment(0)
A
0

Go to Pycharm preference -> Python Interpreter click at + button to add new module and search for webdriver-manager and install it manually. This resolved my problem in mac.

Alainaalaine answered 11/3, 2023 at 9:19 Comment(1)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Footfall
Q
0

Use: from webdrivermanager import ChromeDriverManager

Instead of : from webdriver_manager.chrome import ChromeDriverManager

Quadrisect answered 28/4, 2023 at 9:47 Comment(1)
did you mean webdriver_manager ?Feeding
C
0

you can use latest, updated pip command from pypi.com site, where we can find all latest version commands:

pip install webdriver-manager

latest webdriver version is 4.0.1 for selenium 4

from https://pypi.org/project/webdriver-manager/

Chandos answered 31/1 at 16:43 Comment(1)
Another duplicate answer, with all the information previously mentioned.Baton
B
-2

This works for me in all python version.

pip install webdriver-manager

Here's Lib, Check out: https://pypi.org/project/webdriver-manager/

Brush answered 4/12, 2021 at 10:31 Comment(1)
Duplicate answer, with no new information.Sisterhood
S
-2

Use this in code: from webdriver_manager.chrome import ChromeDriverManager

Spectatress answered 8/6, 2022 at 8:7 Comment(1)
As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.Topazolite
D
-2

Make sure u have installed a correct python version.

I have noted that it works on python version 3.7 or lower version.

Dyad answered 26/6, 2022 at 10:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.