转到WSL后,Selenium不再工作。由于SessionNotCreatedException

转到WSL后,Selenium不再工作。由于SessionNotCreatedException,selenium,ubuntu,windows-subsystem-for-linux,Selenium,Ubuntu,Windows Subsystem For Linux,我使用的WSL版本是WSL2,我使用Ubuntu进行WSL。 selenium.common.exceptions.SessionNotCreatedException:消息:找不到匹配的功能集 是我尝试运行python文件时遇到的错误。以下是文件中的代码: from selenium import webdriver url = "https://www.google.com" driver = webdriver.Firefox() driver.get(url) 我已

我使用的WSL版本是WSL2,我使用Ubuntu进行WSL。
selenium.common.exceptions.SessionNotCreatedException:消息:找不到匹配的功能集
是我尝试运行python文件时遇到的错误。以下是文件中的代码:

from selenium import webdriver
url = "https://www.google.com"
driver = webdriver.Firefox()
driver.get(url)
我已经在WSL之外尝试过这段代码,它是有效的。我无法让它在WSL上工作,geckodriver正在我的道路上