【发布时间】:2021-06-05 10:54:31
【问题描述】:
import selenium
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.keys import Keys
mobile_emulation = {
"deviceName": "iPhone X"
}
chrome_options = webdriver.ChromeOptions()
chrome_options.add_experimental_option("mobileEmulation", mobile_emulation)
chrome_path = "/home/pi/Desktop/chromedriver"
driver = selenium.webdriver.Chrome(executable_path=chrome_path, options=chrome_options)
我正在尝试制作一个 python 3 脚本以在我的 Raspberry Pi 4 上运行,我在 Windows 10 中制作了该脚本。在我的 Raspberry Pi 上运行此脚本时,出现以下错误:
OSError: [Errno 8] 执行格式错误:'/home/pi/Desktop/chromedriver'
有人知道问题出在哪里吗?我对 Linux 还很陌生,因此我们将不胜感激。
【问题讨论】:
-
问题是你运行的程序和树莓派不是同一个架构。更多信息-stackoverflow.com/questions/38732822/…
标签: python-3.x linux selenium selenium-chromedriver raspberry-pi4