chrisckwong821
chrisckwong821

Reputation: 1173

Where brew install has pasted the path exactly

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.

Upvotes: 1

Views: 5045

Answers (2)

stevec
stevec

Reputation: 52498

I arrived here wondering where homebrew installed chromedriver. The answer is found by running this command:

brew info chromedriver

which tells that chromedriver is installed in this directory:

/usr/local/Caskroom/chromedriver/

Upvotes: 1

Harald Nordgren
Harald Nordgren

Reputation: 12409

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

Upvotes: 6

Related Questions