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

最近重新配新的环境,结果遇到报出

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

找了几个解决方法,什么配置环境Path之类的,其实大可不必

只要把版本相应的geckodirver放到位就行

  1. 下载geckodriver  下载链接https://blog.csdn.net/qq_37822398/article/details/89577751
  2. 将下载的geckodriver放在Python安装的目录的Scripts文件夹里
  3. 再重启PyCharm就好了!记得一定要重启哦!

原文地址:https://www.cnblogs.com/hereisdavid/p/13756606.html