问题描述:
在使用Jupyter Notebook 对数据进行抓取的过程中出现了WebDriverException: Message: 'chromedriver' executable needs to be in PATH.
的错误
问题原因:
- chromedriver.exe安装出现问题(没有安装或者安装的chromedriver.exe版本有问题等)
解决方法:
1. 打开谷歌浏览器,输入:chrome://version
查看浏览器的版本:
2.下载合适的chromedriver.exe
http://chromedriver.storage.googleapis.com/index.html
打开notes.txt检查一下是不是和自己Chrome的版本一致,然后结合自己的操作系统从上面的.zip文件中下载
3.环境配置
将chromedriver.exe拷贝至谷歌浏览器目录(默认 C:\Program Files\Google\Chrome\Application)
以及python根目录
PS:不知道路径在哪怎么办?
WIN+R,输入cmd
输入where python