This error message...
selenium.common.exceptions.WebDriverException: Message: Failed to find firefox binary. You can set it by specifying the path to 'firefox_binary':
...implies that the GeckoDriver was unable to find the firefox binary.
Perhaps Firefox browser is installed in a non-conventional location on your machine so GeckoDriver is unable to find it.
Solution
Incase Firefox is installed in a non-conventional location on your machine you need to pass the absolute location of the firefox binary as follows:
from selenium import webdriver
binary = '/path/to/firefox'
# Example of using Firefox Developer Edition on Windows OS
# binary = r'C:\Program Files\Firefox Developer Edition\firefox.exe'
# Example of using Firefox Nightly Edition on Windows OS
# binary = r'C:\Program Files\Nightly\firefox.exe'
options = webdriver.FirefoxOptions()
options.binary = binary
browser = webdriver.Firefox(firefox_options=options, executable_path='/path/to/geckodriver')
browser.get('http://google.com/')
browser.quit()
You can find a relevant discussion in How to open Firefox Developer Edition through Selenium