pip install selenium没装brew的请装brew:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"装了brew之后,直接执行:
brew tap homebrew/cask
brew cask install chromedriver或者你的brew很慢很慢,卡主不动,也可以直接下载:
https://sites.google.com/a/chromium.org/chromedriver/downloadshttps://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/https://github.com/mozilla/geckodriver/releaseshttps://webkit.org/blog/6900/webdriver-support-in-safari-10/我偏爱的是Chrome,不过Chrome需要通过那种方式才能下载。不过通过这种方式下载的,要在下面使用的时候写清楚路径。还要注意一点是,要对应你的Chrome版本。
查看版本:

from selenium import webdriver
driver = webdriver.Chrome()   # 注意,这里如果找不到,请写你的chromedriver路径在括号参数里
driver.get('https://google.com')
print(driver.title)