[Python]解决chromedriver executable needs to be in path问题

1.首先需要下载Chromedriver,下载后得到的是一个chromedriver.exe文件。

(注意:版本要与当前浏览器版本对应,不然报错。)
chromedriver下载地址:http://npm.taobao.org/mirrors/chromedriver/

2.将chromedriver.exe拷贝至谷歌浏览器目录(如 C:\Program Files\Google\Chrome\Application)
以及python根目录(C:\Python36)。

3.将谷歌浏览器环境变量添加到path(C:\Users\admin\AppData\Local\Google\Chrome\Application)。
OK!至此,就可以解决 ‘chromedriver’ executable needs to be in path问题了。

分享到:

评论已关闭。