Selenium gives "selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary" on Mac Selenium gives "selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary" on Mac selenium selenium

Selenium gives "selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary" on Mac


The issue is that chromedriver also needs to know where chrome is. In your case it is at a non-default path. So you need to specify the complete path to the Google Chrome binary.

options = webdriver.ChromeOptions()options.binary_location = "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"chrome_driver_binary = "/usr/local/bin/chromedriver"driver = webdriver.Chrome(chrome_driver_binary, chrome_options=options)

Above code is what you should use


I have met this annoying problem when I am lerning selenium. This is my solution: (MacOS 10.13.4)

  1. uninstall my chrome
  2. use homebrew to install chromedriver: brew cask install chromedriver
  3. use homebrew to install chrome: brew cask install google-chrome

Thanks to homebrew now chrome and chromedriver are installed in the same folder and this problem will be automatically solved.


It is important on Win to set the name of chrome.exe otherwise it fail to create a process (see below):

  from selenium import webdriver  from webdriver_manager.chrome import ChromeDriverManager  options = webdriver.ChromeOptions()  options.binary_location = r"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"  chrome_driver_binary = r"C:/Users/Max/.wdm/chromedriver/75.0.3770.8/win32/chromedriver.exe"  driver = webdriver.Chrome(chrome_driver_binary, chrome_options=options)  driver.get('http://web.whatsapp.com')

selenium.common.exceptions.WebDriverException: Message: unknown error: Failed to create a Chrome process.

For Firefox (download driver https://github.com/mozilla/geckodriver/releases):

  options = webdriver.FirefoxOptions()  #options.add_argument('-headless')  #options.binary_location = r"C:\maxbook\maxboxpython\geckodriver-v0.24.0-win64\geckodriver.exe"  options.binary_location = r"C:\Program Files (x86)\Mozilla Firefox\firefox.exe"  firefox_driver_binary = r"C:\maxbook\maxboxpython\geckodriver-v0.24.0-win64\\"  driver = webdriver.Firefox(firefox_driver_binary, options=options)