我已经安装了webdriver和selenium。当我试图运行一个代码来打开谷歌,我得到这个错误。我已经多次尝试将.exe添加到路径中,但都不起作用。
消息=消息:“chromedriver.exe”可执行文件需要在PATH中。请参见https://sites.google.com/a/chromium.org/chromedriver/home
我已经安装了webdriver和selenium。当我试图运行一个代码来打开谷歌,我得到这个错误。我已经多次尝试将.exe添加到路径中,但都不起作用。
消息=消息:“chromedriver.exe”可执行文件需要在PATH中。请参见https://sites.google.com/a/chromium.org/chromedriver/home
2条答案
按热度按时间plicqrtu1#
现在你可以设置chromedriver自动升级:
pip install chromedriver-autoinstaller
代码:
尝试以下代码进行手动设置:
jucafojl2#
在执行时安装驱动程序。
使用
webdriver_manager
python包会将其存储到缓存中,并将确切的路径传递给驱动程序。只有有更新版本的驱动程序才会下载