selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.

http://www.seleniumhq.org/download

1. selenium 3.x开始,webdriver/firefox/webdriver.py的__init__中,executable_path="geckodriver";而2.x是executable_path="wires"
2. firefox 47以上版本,需要下载第三方driver,即geckodriver;在http://docs.seleniumhq.org/download/的Third Party Drivers, Bindings, and Plugins下面找到Mozilla GeckoDriver,下载到任意电脑任意目录,解压后将该路径加入到PC的path(针对windows)即可。

作者:iceblue iceblue
链接:https://www.zhihu.com/question/49568096/answer/119324584
来源:知乎
著作权归作者所有,转载请联系作者获得授权。

原文地址:https://www.cnblogs.com/zhang-pengcheng/p/6082326.html