After installing Selenium in Ubuntu and adding geckodriver to path I get this error when I run
from selenium import webdriver
driver = webdriver.Firefox()
Had the same problem. There were two ways to fix this for me:
Add executable_path arg in webdriver:
driver = webdriver.Firefox(executable_path='/path/to/geckodriver')
And the second way its to add folder that contains geckodriver using export (only folder, not geckodriver):
$ export PATH=$PATH:/path/to/