Can not connect to the Service chromedriver的解决方法

具体报错信息如下:
selenium.common.exceptions.WebDriverException:Message: Can not connect to the Service chromedriver

遇见这个坑爹的问题,卡了我一天多,卸载重装了python 和浏览器N边,还是不行,最后发现问题出现在了 hosts文件里面 少了127.0.0.1 localhost

 # localhost name resolution is handled within DNS itself.
 # 127.0.0.1       localhost
 # ::1  localhost

   ::1  localhost

把 # 127.0.0.1 localhost前面的#号去掉就OK了

你可能感兴趣的:(Can not connect to the Service chromedriver的解决方法)