如何在Conda虚拟环境中升级ChromeDriver至123.0.6312.86版本?
在Conda虚拟环境中升级ChromeDriver至123.0.6312.86版本
方法一:通过conda-forge源安装
- 激活你的Conda虚拟环境:
conda activate 你的虚拟环境名称 - 卸载旧版ChromeDriver:
conda remove chromedriver - 安装指定版本的ChromeDriver:
若conda-forge源无此版本,换用方法二操作。conda install -c conda-forge chromedriver=123.0.6312.86
方法二:手动下载替换
- 激活虚拟环境后,定位当前ChromeDriver的安装路径:
会返回类似# Linux/macOS系统执行 which chromedriver # Windows系统执行 where chromedriver你的虚拟环境路径/bin/chromedriver(Windows为Scripts目录)的路径。 - 下载对应123.0.6312.86版本的ChromeDriver(匹配你的操作系统:Windows/macOS/Linux)。
- 解压下载包,得到
chromedriver(Windows为chromedriver.exe),替换掉上述路径中的旧文件。 - 验证版本:
输出需显示chromedriver --versionChromeDriver 123.0.6312.86。
验证修复效果
运行你的Selenium脚本,确认不再触发以下错误:
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 103 Current browser version is 123.0.6312.86 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe
内容的提问来源于stack exchange,提问作者techiekamran
相关产品推荐
相关产品推荐

