Home >Backend Development >Python Tutorial >How to Resolve the \'ModuleNotFoundError: No \'webdriver_manager\' Module\' Error?
Despite installing webdrivermanager, you encounter the error "ModuleNotFoundError: No module named 'webdriver_manager'". Let's explore the issue and provide a solution.
Your initial installation command seems to have a typo: "pip install webdrivermanager" instead of "pip install webdriver_manager". Ensure that you're using the correct command.
As per the provided documentation, the latest version of webdriver_manager requires Python 3.6 or higher. Verify that your Python version meets this requirement.
There has been a package name change: webdriver_manager is now referred to as webdriver-manager. Therefore, the correct installation command is:
pip install webdriver-manager
Check if the installation was successful by verifying its presence in your environment:
python -c "import webdriver_manager"
If the import is successful, you will not encounter any errors.
Now, you should be able to use webdriver_manager without errors. Here's a revised version of your example:
from selenium import webdriver from webdriver_manager.chrome import ChromeDriverManager driver = webdriver.Chrome(executable_path=ChromeDriverManager().install()) driver.get('https://www.google.com/')
The above is the detailed content of How to Resolve the 'ModuleNotFoundError: No 'webdriver_manager' Module' Error?. For more information, please follow other related articles on the PHP Chinese website!