macでseleniumが使えない。

前提

Google Colabを利用して、seleniumを利用したいのですが、エラーが出て困っています。
初歩的な質問かもしれませんが、ご教授頂けますと幸いです。

発生している問題・エラーメッセージ

FileNotFoundError Traceback (most recent call last) /usr/local/lib/python3.7/dist-packages/selenium/webdriver/common/service.py in start(self) 75 stdin=PIPE, ---> 76 creationflags=self.creationflags) 77 except TypeError: 5 frames FileNotFoundError: [Errno 2] No such file or directory: 'chromedriver': 'chromedriver' During handling of the above exception, another exception occurred: WebDriverException Traceback (most recent call last) /usr/local/lib/python3.7/dist-packages/selenium/webdriver/common/service.py in start(self) 81 raise WebDriverException( 82 "'{}' executable needs to be in PATH. {}".format( ---> 83 os.path.basename(self.path), self.start_error_message) 84 ) 85 elif err.errno == errno.EACCES: WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://chromedriver.chromium.org/home

該当のソースコード

python

browser = webdriver.Chrome()

試したこと

こちらに記載のあった、ターミナルで'/Applications/Google Chrome.app/Contents/MacOS/Google Chrome'と'の囲み付きで打ち込んだところ、Chromeは起動しました。
https://teratail.com/questions/305518

コメントを投稿

0 コメント