OSError: [Errno 8] Exec format error selenium

Looks like this is complaining about the format of chromedriver binary. It might be because of platform and chromedriver format mismatch. For example windows requires chromedriver.exe while there are different formats for linux and mac.

If you don't want to install through package manager, just download chromedriver from https://sites.google.com/a/chromium.org/chromedriver/downloads

Note : Choose file as per your os

Then place it anywhere on the os and pass that path as an argument. You can also set webdriver.chrome.driver environment variable if you don't want to pass the location every time.


FYI you could also encounter this issue if you did not unzip the chromedriver before adding it to your PATH.