(image from https://mirella-gabriele.deviantart.com )
First, get geckhodriver: put geckodriver https://github.com/mozilla/geckodriver/releases
Then export path (not really necessary if in the code puts the path):
export PATH=$PATH:/path/to/directory/of/executable/downloaded
Or put the path in the code:
driver = webdriver.Firefox(executable_path='/path/to/directory/of/executable/downloaded/in/previous/step')
pip install selenium
python main.py