0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

chromedriver_binaryのバージョンをそろえる

Posted at

WindowsのChrome86が入った環境で
ドライバの.exeをいちいち入れるのが何となく嫌で
自動でドライバを選んでくれる?らしい

import chromedriver_binary

を使おうと思い

pip install import chromedriver_binary

を実行して
pythonのseleniumを使ったコードを実行したら
あんたのChromeとバージョンが違う、というエラーが出た。

どうやら現時点最新の Chrome87用がインストールされたらしい。
では自分のChrome86のバージョンを確認して

pip install import chromedriver_binary==86.04240.193

そのまま実行すると

ERROR: Could not find a version that satisfies the requirement chromedriver_binary==86.04240.193 (from versions: 2.29.1, 2.31.1, 2.33.1, 2.34.0, 2.35.0, 2.35.1, 2.36.0, 2.37.0, 2.38.0, 2.39.0, 2.40.1, 2.41.0, 2.42.0, 2.43.0, 2.44.0, 2.45.0, 2.46.0, 70.0.3538.16.0, 70.0.3538.67.0, 70.0.3538.97.0, 71.0.3578.30.0, 71.0.3578.33.0, 71.0.3578.80.0, 71.0.3578.137.0, 72.0.3626.7.0, 72.0.3626.69.0, 73.0.3683.20.0, 73.0.3683.68.0, 74.0.3729.6.0, 75.0.3770.8.0, 75.0.3770.90.0, 75.0.3770.140.0, 76.0.3809.12.0, 76.0.3809.25.0, 76.0.3809.68.0, 76.0.3809.126.0, 77.0.3865.10.0, 77.0.3865.40.0, 78.0.3904.11.0, 78.0.3904.70.0, 78.0.3904.105.0, 79.0.3945.16.0, 79.0.3945.36.0, 80.0.3987.16.0, 80.0.3987.106.0, 81.0.4044.20.0, 81.0.4044.69.0, 81.0.4044.138.0, 83.0.4103.14.0, 83.0.4103.39.0, 84.0.4147.30.0, 85.0.4183.38.0, 85.0.4183.83.0, 85.0.4183.87.0, 86.0.4240.22.0, 87.0.4280.20.0)
ERROR: No matching distribution found for chromedriver_binary==86.04240.193

見つからない、この一覧しか無いぞ?とのこと。
完全一致のバージョンが無いが、同じ86だったら大丈夫だろうか?

pip install import chromedriver_binary==86.0.4240.22.0

すると、動いた。
めでたしめでたし。

0
2
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?