Categories
Python Answers

How to fix Error message: “‘chromedriver’ executable needs to be available in the path” with Python Selenium?

Spread the love

Sometimes, we want to fix Error message: "’chromedriver’ executable needs to be available in the path" with Python Selenium.

In this article, we’ll look at how to fix Error message: "’chromedriver’ executable needs to be available in the path" with Python Selenium.

How to fix Error message: "’chromedriver’ executable needs to be available in the path" with Python Selenium?

To fix Error message: "’chromedriver’ executable needs to be available in the path" with Python Selenium, we install webdriver-manager.

To install it, we run

pip install webdriver-manager

Then we use it by writing

from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager

driver = webdriver.Chrome(ChromeDriverManager().install())

in our Selenium Python code.

Conclusion

To fix Error message: "’chromedriver’ executable needs to be available in the path" with Python Selenium, we install webdriver-manager.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *