2

When I try to create a Selenium Firefox Webdriver on my Orange Pi with Armbian Buster like

import selenium
from selenium import webdriver
from selenium.webdriver.firefox.options import Options
    
options = Options()
options.headless = True    
driver = webdriver.Firefox(options=options, executable_path='/usr/local/bin/geckodriver')

the exception

selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH. 

is thrown. This happens when I use the last geckodriver build for ARMv7 from github and when I build the geckodriver according to here.

The geckodriver binary lies in /usr/local/bin/ and is executable, but when I try to

geckodriver --version

I get

-bash: /usr/local/bin/geckodriver: No such file or directory

which leads my to the assumption that there is something fundamentally wrong with my approach. So how do I install geckodriver correctly on the Orange Pi with Armbian Buster?

Frant
  • 5,382
  • 1
  • 16
  • 22
Andy Ef
  • 155
  • 1
  • 8

2 Answers2

4

I solved the problem by downloading the latest Ubuntu ARM64 package for firefox-geckodriver, extracting the geckodriver binary and placing it in /usr/local/bin. This is also way faster than compiling the geckodriver myself and provides the most recent geckodriver release.

Andy Ef
  • 155
  • 1
  • 8
0

Just use this https://pypi.org/project/webdriver-manager/.

No Hassle of providing the path of Geckodriver. This will do that for you.

Shrini
  • 193
  • 10
  • Does this provide a binaries for ARM64 aswell? – Andy Ef Oct 09 '20 at 19:02
  • 1
    Ok, this will not work since webdriver_manager only downloads the latest the x64 version from github, so a `OSError: [Errno 8] Exec format error: '/root/.wdm/drivers/geckodriver/linux64/v0.27.0/geckodriver'` exception is thrown – Andy Ef Oct 09 '20 at 23:21
  • For now there is no official ARM64 geckodriver releases. So webdriver-manager has no possibilities to download ARM64 drivers which are not released officially. And it cant't build them yet. https://github.com/SergeyPirogov/webdriver_manager/issues/200 – gore Feb 13 '22 at 22:53