mac chromedriver error

問題一:MAC 使用splinter errorhtml

Traceback (most recent call last):
    from splinter.browser import Browser
    b = Browser(driver_name="chrome")
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/splinter/browser.py", line 63, in Browser
    return driver(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/splinter/driver/webdriver/chrome.py", line 28, in __init__
    self.driver = Chrome(chrome_options=options, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/selenium/webdriver/chrome/webdriver.py", line 61, in __init__
    self.service.start()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/selenium/webdriver/chrome/service.py", line 73, in start
    os.path.basename(self.path), docs_msg)
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home

解決辦法:python

按照其餘人的建議:brew install chromedriver  行不通。下載連接已失效。web

本身下載zip文件  地址:http://chromedriver.storage.googleapis.com/index.htmlchrome

 

接着 api

$unzip chromedriver_map32.zip 

$mv chromedriver /usr/local/bin

$cd /usr/local/bin

$chmod a+x chromedirver

完事!python2.7

相關文章
相關標籤/搜索