报错:selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary

selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary报错

报错:selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary
问题:已配置环境变量,并把chromedriver配置到Python目录下,运行文件后报错

操作:修改环境变量配置,还是报错
报错:selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary
报错:selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary
原因:
浏览器与驱动的版本不适配,浏览器版本chrome://version/查看,为86.0.4240.111 (正式版本) (64 位),而驱动用了现成的是71的(据说兼容性比较好)

解决步骤:https://npm.taobao.org/mirrors/chromedriver 下载与浏览器一致的驱动器,解压后将chromedriver放到Python目录下(前提是Python目录已配置为系统环境变量)

报错:selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary