sudo apt install firefox firefox-geckodriver pip install selenium PyVirtualDisplay xvfbwrapper
from pyvirtualdisplay import Display from selenium import webdriver display = Display(visible=0, size=(1024, 768)) display.start() driver = webdriver.Firefox() driver.get('https://erogol.com/') driver.quit() display.stop()
ref: https://erogol.com/setting-selenium-raspberrypi-23/