ModuleNotFoundError: No module named 'webdriver_manager' error even after installing webdrivermanager
Solution 1
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:
Reference: https://pypi.org/project/webdriver-manager/
Solution 2
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())
Solution 3
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
Solution 4
You can try this
py -3 -m pip install webdriver_manager
Solution 5
This worked for me:
python3 -m pip install webdriver-manager
I'm on windows so I'll leave this incase it helps anyone.
![undetected Selenium](https://i.stack.imgur.com/w4d7E.png?s=256&g=1)
undetected Selenium
A full stack test automation engineer and a web security analyst working with Selenium (Java/Python). Owner of Selenium room & top answerer in selenium and selenium-webdriver tags. If any of my discussion / article was helpful, you may like to... | or you can also |GPay If any of your question wants my attention you can email me at debanjan[dot]selenium[at]gmail[dot]com. You can Send a Thank You note to me! too... I'm reachable through LinkedIn
Updated on August 05, 2022Comments
-
undetected Selenium almost 2 years
I've installed webdrivermanager on my windows-10 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 sublimetext3
-
gore over 2 years
webdrivermanager
andwebdriver-manager
- are different libraries. Your code is fromwebdriver-manager
library, which has two aliases:webdriver_manager
&webdriver-manager
and could be installed by any of them.
-
-
soMarios over 3 years@ScottyBlades check the version of python
-
ScottyBlades over 3 yearsYea. That was it. ty.
-
ScottyBlades over 3 yearsPerhaps you can update your answer to give an explanation of Python versioning issue, specifically, macs come loaded with 2.7 but a lot of tap dancing is needed to function with 3+. I can upvote that.
-
Vishal Kharde over 3 years@Mario It should be updated to "pip install webdriver-manager" as per the latest doc
-
soMarios over 3 years@VishalKharde thanks for letting me know. I updated my answer. Kudos :)
-
gore over 2 yearsThis is another library ;) with irrelevant to topic-starter's code.
-
joanis over 2 yearsDuplicate answer, with no new information.