Best way to install chrome driver in you OS (python)

ChromeDriverBinaryAuto:

ChromeDriverBinaryAuto can be used to automatically detect the latest chrome-driver version required for the installed Chrome/Chromium browser.

Pre-requisite:

Please make sure to install Chrome or Chromium first and add the browser to the binary search path.

Installation:

pip install chromedriver-binary-auto
pip install --upgrade --force-reinstall chromedriver-binary-auto

From GitHub:

pip install git+https://github.com/danielkaiser/python-chromedriver-binary.git#chromedriver-binary-auto

Usage:

To use chromedriver just import chromedriver_binary. This will add the executable to your PATH so it will be found. You can also get the absolute filename of the binary with chromedriver_binary.chromedriver_filename

Example:

from selenium import webdriver
import chromedriver_binary # Adds chromedriver binary to path

driver = webdriver.Chrome()
driver.get("http://www.python.org")
assert "Python" in driver.title
$ export PATH=$PATH:`chromedriver-path`

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store