Using chromedriver with selenium/python/ubuntu Using chromedriver with selenium/python/ubuntu python python

Using chromedriver with selenium/python/ubuntu


Following the suggestion from https://askubuntu.com/questions/539498/where-does-chromedriver-install-to I was able to make it work like this:

  1. Installed the chromium-chromedriver:

    sudo apt-get install chromium-chromedriver
  2. Adding the path to the selenium line:

    driver = webdriver.Chrome("/usr/lib/chromium-browser/chromedriver")

Note that this opens Chromium and not Chrome. Hope it was helpful.


I have solved the issue in the following way:

  1. Open a terminal and type whereis chromedriver. In my case, I had the following output:

    chromedriver: /usr/local/bin/chromedriver

  2. Copy that path and edit your Webdriver instance like:

driver = webdriver.Chrome('/usr/local/bin/chromedriver')

That should be enough!


The following should normally work:

driver = webdriver.Chrome(executable_path='/usr/local/bin/chromedriver')

Note that in your question there was no preceding '/' in the path.

Additionally, make sure that the chromedriver executable located in /usr/local/bin/ has appropriate file permissions, i.e. that it can be executed:

> chmod 777 /usr/local/bin/chromedriver