0

I am on Raspberry Pi (Linux), and I'm trying to launch my Python program, but it prompts me an error:

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

I know that I need to set PATH = /location, but the problem is that I can't locate the chromedriver.exe file, so my question is, where should this be located? I downloaded selenium by doing pip3 install selenium and i searched my whole /home/pi/.local/lib/python3.7/site-packages folder but I can't seem to find it.

Should I just put my whole site-packages as a path - wouldn't that be quite risky and stupid?

1 Answers1

0

Following the suggestion from https://askubuntu.com/questions/539498/where-does-chromedriver-install-to I was able to make it work like this:

Installed the chromium-chromedriver:

sudo apt-get install chromium-chromedriver

Adding the path to the selenium line:

driver = webdriver.Chrome("/usr/lib/chromium-browser/chromedriver")
OR
driver = webdriver.Chrome()

Note that this opens Chromium and not Chrome. Hope it was helpful.

Revisto
  • 1,211
  • 7
  • 11