尝试运行python脚本但收到错误。谁能帮我? 我安装了一个版本3,但一直告诉我版本2.7
Traceback (most recent call last):
File "screen.py", line 10, in <module>
driver = webdriver.Chrome()
File "/Library/Python/2.7/site-packages/selenium/webdriver/chrome/webdriver.py", line 68, in __init__
self.service.start()
File "/Library/Python/2.7/site-packages/selenium/webdriver/common/service.py", line 83, in start
os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
任何人都可以帮我吗?
答案 0 :(得分:0)
您可以在此处下载ChromeDriver: https://sites.google.com/a/chromium.org/chromedriver/downloads
然后将其添加到您的路径,或将其放在同一目录中 您的python脚本或直接指定位置,例如
driver = webdriver.Chrome('C:/path/to/chromedriver.exe')