After installing Selenium in Ubuntu and adding geckodriver to path I get this error when I run
from selenium import webdriver
driver = webdriver.Firefox()
In addition to the answer by @Poloq, the simplest way would be keeping your geckodriver
binary in a directory which is already in your PATH
.
mv geckodriver /usr/local/bin
This way you can avoid additional settings/configurations in your project with the downside of having an additional step when deploying on different systems.