zocalo
Posts: 4
Joined: Sat Jul 19, 2014 4:30 pm

chromedriver for Raspbian? alternatives?

Mon Feb 26, 2018 4:40 am

Hi to all,

I did a Python (.py) script for webscrapping, using BeautifulSoup and Selenium packages. The program works perfectly in my laptop, which runs with Ubuntu 16.04, and uses Chromedriver to access the web.

I wanted to use the same program in my Raspberry Pi, that runs with Raspbian. For this, I copied the .py file, installed BeautifulSoup4 and Selenium without any trouble. I also installed Chromedriver in my Raspberry Pi with a simple comand: pip install chromedriver

However, when I launch the program, I get that error message:
:?

Code: Select all

Traceback (most recent call last):
  File "180225_bus_display_0.6.py", line 63, in <module>
    driver = webdriver.Chrome("/usr/local/lib/python2.7/dist-packages/chromedriver", chrome_options=options)
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/chrome/webdriver.py", line 68, in __init__
    self.service.start()
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/common/service.py", line 88, in start
    os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable may have wrong permissions. Please see https://sites.google.com/a/chromium.org/chromedriver/home
I checked in the RPi what's in the path /usr/local/lib/python2.7/dist-packages/chromedriver, and I find only two files:
__init__.py
__init__.pyc

In my laptop, at the equivalent folder I find many more files, notably the file chromedriver

Can anyone provide me some hints on how I can get chromedriver running in my Raspberry Pi?

Otherwise, should I change chromedriver for an alternative equivalent? Which one you recommend? I require to use it headless.

Thanks in advance for your help.
:)

wisenbaker99
Posts: 2
Joined: Thu Apr 05, 2018 9:49 am

Re: chromedriver for Raspbian? alternatives?

Thu Apr 05, 2018 9:52 am

Go to: https://packages.debian.org/stretch/arm ... r/download

get chromium-driver_63.0.3239.84-1~deb9u1_armhf.deb on ARM Hard Float machines

use sudo dpkg -i packagename to have chromedriver installed into /usr/bin

does produce error messages BUT chromedriver install succeeds! :)

Return to “Troubleshooting”