Python + Browser with Mac: Error - 'chromedriver' executable needs to be in PATH

Jo Ko picture Jo Ko · Apr 20, 2017 · Viewed 16k times · Source

I did the following but came across the error:

selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home

from splinter import Browser

browser = Browser('chrome')

How can I go about resolving the issue using Mac?

Thank you in advance and will be sure to upvote/accept answer!

Answer

brennan picture brennan · Apr 21, 2017

The easiest way to resolve this is on a Mac is to:

brew cask install chromedriver

Splinter and similar frameworks for browser automation rely on external modules being installed and callable in PATH.

Edit: chromedriver migrated from homebrew/core to homebrew/cask