如何解决 Mac 上的这个 Selenium 异常,即 "chrome not reachable"?

How do I resolve this Selenium exception on a Mac thats says "chrome not reachable"?

我正在尝试学习如何使用 Selenium 自动化 Web 进程,并希望能够构建强大的 Web 抓取工具和其他东西。所以,我刚刚安装完 Pycharm 和 Selenium,我只是想 运行 一个简单的代码片段,在 chrome 中打开一个网页,没什么特别的。我的代码如下(当然是在Python)

from selenium import webdriver


PATH = "/Users/Kudzie/Tools/chromedriver"
driver = webdriver.Chrome(PATH)
driver.get('https://orbitrevolution.tech')

所以,当我 运行 这段代码时,我得到了这个异常,我不知道如何解决这个问题,我已经尝试阅读这个问题的过去变体,但我似乎没有得到一个有效的解决方案。异常如下

Traceback (most recent call last):
  File "/Users/Kudzie/PycharmProjects/Web Scraper/main.py", line 5, in <module>
    driver = webdriver.Chrome(PATH)
  File "/Users/Kudzie/PycharmProjects/Web Scraper/venv/lib/python3.9/site-packages/selenium/webdriver/chrome/webdriver.py", line 76, in __init__
    RemoteWebDriver.__init__(
  File "/Users/Kudzie/PycharmProjects/Web Scraper/venv/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
    self.start_session(capabilities, browser_profile)
  File "/Users/Kudzie/PycharmProjects/Web Scraper/venv/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "/Users/Kudzie/PycharmProjects/Web Scraper/venv/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "/Users/Kudzie/PycharmProjects/Web Scraper/venv/lib/python3.9/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: chrome not reachable


Process finished with exit code 1

尝试替换这个:

driver = webdriver.Chrome(PATH)

有了这个:

driver = webdriver.Chrome(executable_path=PATH)