1. 程式人生 > >解決 'chromedriver' executable needs to be in PATH.'報錯

解決 'chromedriver' executable needs to be in PATH.'報錯

pat ica span ati www. 文件 .com ogl edr

試了把chromedriver.exe放到chrome安裝文件下,python安裝文件下,然後把路徑配到path裏,均無用。

最後是修改函數調用得以解決:

from selenium import  webdriver

browser = webdriver.Chrome(executable_path = ‘C:\Program Files (x86)\Google\Chrome\Application\chromedriver_X64.exe‘)
browser.get(‘http://www.baidu.com‘)

解決 'chromedriver' executable needs to be in PATH.'報錯