Python Selenium This version of ChromeDriver only supports Chrome version 107 Current browser version is 109.0.5414.87 with binary path /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

久しぶりにPythonでSeleniumを使用してスクレイピングを行なっていると、

This version of ChromeDriver only supports Chrome version 107
Current browser version is 109.0.5414.87 with binary path /Applications/Google Chrome.app/Contents/MacOS/Google Chrome


↑のようなエラーが出たので対処方

サポートされているバージョンとchromeのバージョンが違うとのことでアップグレード

$ !pip install --upgrade chromedriver-binary



※ JypyterLabを使用している方はpipの前に「!」を入れましょう

$ !pip install --upgrade chromedriver-binary



アップグレードした際、現バージョンと合わずバージョンを下げないといけない場合もあります。

Chromeに対応するChromeDriverを再インストールするには、
https://pypi.org/project/chromedriver-binary/#history
こちらからバージョンにあったインストールコマンドをコピーすることができるので便利です。