Open kamikaze opened 4 years ago
OSError: [Errno 8] Exec format error: '/.venv38/lib64/python3.6/site-packages/webbot/drivers/chrome_linux'
AFAICT, there is no ChromeDriver binary available for aarch64
. The only version for Linux that the Chromium project ships is compiled for x86-64
.
If you're using a raspberry pi (Which I guess is just arm64, but you might try something similar), this appears to be a workaround: (Tested on a raspberry pi 4, python 3.7.3)
open terminal:
pip3 install webbot
sudo apt install chromium-chromedriver
sudo cp /usr/lib/chromium-browser/chromedriver /usr/local/lib/python3.7/dist-packages/webbot/drivers/chrome_linux
You'll have to run as su, unless you comment out os.chmod(driverpath , 0o755 )
I'm sure this driver could be added to the project.
tgikal - I have tried your solution on raspberry pi but I am getting: selenium.common.exceptions.WebDriverException: Message: chrome not reachable (Session info: chrome=86.0.4240.197) Do you have any idea what can be wrong?
Mykadlo - The driver is not finding a version of chromium it likes.
I haven't needed to update this for a while, so I don't have anything to test it on.
I can only suggest making sure everything is up to date,
sudo apt update
sudo apt upgrade
make sure chromium is installed: sudo apt install chromium
Make sure the location /usr/lib/chromium-browser
actually contains the chrome driver, they may have moved it or something.
cd /usr/lib/chromium-browser
, dir
check what version python you're using: python3 --version
and copy the driver to the relevant webbot driver folder.
It's currently working for me with python 3.7.3-1, chromium 78.0.3904.108-rptl, chromium-chromedriver 78.0.3904.108-rptl, and webbot 0.1.4 (selenium 3.141.0)
Edit -
So yeah, I'm running a way older version of webbot, I'd look at what they've changed in the driver usage since then.
I'd try downgrading selenium to 3.141.0:
sudo pip3 uninstall selenium
sudo pip3 install selenium==3.141.0
Its only 2 versions old and they're not super focused on making things work for the raspberry pi.
thanks tgikal. I am just adding what worked for me:
sudo apt install chromium
sudo apt-get install chromium-chromedriver
this installed /usr/lib/chromium-browser/chromedriver which is symlink to chromedriver.
Then I replaced chrome-linux file in webbot/drivers directory with symlink to chromedriver, in my case like this:
sudo mv chrome_linux chrome_linux_bak
sudo ln -s /usr/lib/chromium-browser/chromedriver chrome_linux
Currently I'm able to install webbot but not instantiate Browser