selenium – ***** can not in ****** UBUNTU ******* but can in **** Anaconda **** or ***** Spyder ****** * *

If I write

def (t) driver:
import time
from the selenium import webdriver
from selenium.webdriver.common.by import by
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support, import expected_conditions as CE
from selenium.common.exceptions import TimeoutException
from selenium.webdriver.common.desired_capabilities, import DesiredCapabilities
from selenium.webdriver.firefox.options Import Options
since selenium.webdriver.firefox.firefox_binary import FirefoxBinary
binary = FirefoxBinary (r / usr / bin / firefox / firefox / firefox & # 39;)
cap = DesiredCapabilities (). FIREFOX
cap["marionette"] = True
cap['binary'] = & # 39; / usr / bin / firefox & # 39;
path = "C: /Users/a.sakata/AppData/Local/Packages/CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc/LocalState/rootfs/usr/local/bin/geckodriver"
try again = 3
for i in the range (try again):
try:
options = Options ()
options.headless = True
print ("first")
browser = webdriver.Firefox ()
print ("second")
with the exception of e:
print
time.sleep (i * 5)
try:
browser.get (t)
except:
return None
print (browser.page_source)
browser.quit ()

the result of Anaconda or Spyder was not a problem, but at UBUNTU, the result is

Message: Can not find a matching set of capabilities.

The geckodriver path for Windows is /path/to/geckodriver.exe
Linux is / path / to / geckodriver (not exe)

Why can not I reinstall