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

前端 未结 6 2061
星月不相逢
星月不相逢 2020-12-06 04:29

Trying to get selenium to work with Python 3 for web scraping purposes:

from selenium import webdriver
chrome_path = r\"/Library/Frameworks/Pyth         


        
6条回答
  •  情书的邮戳
    2020-12-06 05:28

    If anyone is getting the same error on a linux machine, then you are missing google chrome installation as one of the steps needed for chrome driver to work.

    Follow this link to install Google chrome on Linux.

    Now, check code

    driver = webdriver.Chrome(executable_path='/usr/bin/chromedriver', options=chrome_options, service_args=['--verbose', '--log-path=/tmp/chromedriver.log'])
    

    For me it worked.

提交回复
热议问题