I was trying to use splinter which is a web-browsing package based on selenium.
Initially I attempted to run and got the error even though I have downloaded the chromedriver.
from splinter import Browser
browser = Browser()
os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
However I managed to run the code after brew install chromedriver
.
I am curious of where exactly brew install has pasted the path into. I look into .bash_profile and didnt find any difference.
To find out where the actual files are installed run brew info chromedriver
. On my machine this gives the path
/usr/local/Cellar/chromedriver/2.33
This is not in my $PATH
, but running type
on the program tells us that
$ type chromedriver
chromedriver is /usr/local/bin/chromedriver
Which is in the path. And furthermore, that path is a symlink to the actual installation folder, which you can find out like this
ls -l /usr/local/bin/chromedriver
lrwxr-xr-x 1 harald admin 44 Nov 25 21:08 /usr/local/bin/chromedriver -> ../Cellar/chromedriver/2.33/bin/chromedriver