Issue when trying to run Chromedriver and receive PATH error message - Please Help

1,833 views
Skip to first unread message

xpo...@gmail.com

unread,
Jul 15, 2017, 11:49:02 AM7/15/17
to ChromeDriver Users
Hello:

I am trying to run a script and when I run python main.py, I receive this message. Any idea how to resolve?

Traceback (most recent call last):
File "main.py", line 230, in <module>
lv = LouisVuittonAPI(region, browser)
File "main.py", line 50, in __init__
self.driver = webdriver.Chrome()
File "/Library/Python/2.7/site-packages/selenium/webdriver/chrome/webdriver.py", line 62, in __init__
self.service.start()
File "/Library/Python/2.7/site-packages/selenium/webdriver/common/service.py", line 81, in start
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


Thanks for any help

Shawn McCarthy

unread,
Jul 16, 2017, 12:07:17 AM7/16/17
to ChromeDriver Users, xpo...@gmail.com
Put chromedriver in the PATH ?

xpo...@gmail.com

unread,
Jul 16, 2017, 12:11:51 AM7/16/17
to ChromeDriver Users, xpo...@gmail.com
Could you explain how I can do that? Sorry I'm not tech savvy.

Shawn McCarthy

unread,
Jul 16, 2017, 12:25:29 AM7/16/17
to ChromeDriver Users, xpo...@gmail.com
On Linux or OSX? You can put the chromedriver executable in /usr/local/bin/  . I'm not a Windows person, but I think you can google how to add something to the PATH.

xpo...@gmail.com

unread,
Jul 16, 2017, 12:28:29 AM7/16/17
to ChromeDriver Users, xpo...@gmail.com
I'm actually running it on OSX. Any chance you can provide some step by step instructions?


On Saturday, July 15, 2017 at 8:49:02 AM UTC-7, xpo...@gmail.com wrote:

gmani...@chromium.org

unread,
Jul 17, 2017, 6:55:32 PM7/17/17
to ChromeDriver Users, xpo...@gmail.com
Path to chromedriver binary can be set while instantiating Chromedriver. Please see below sample code:

import time
from selenium import webdriver

driver = webdriver.Chrome('/path/to/chromedriver')
driver.get('http://www.google.com/');

You may refer https://sites.google.com/a/chromium.org/chromedriver/getting-started

Hope this helps!

Reply all
Reply to author
Forward
Message has been deleted
0 new messages