JupyterLabのNotebook上でGoogle Chromeの起動をさせたいのですが、
「WebDriverException: Message: Service chromedriver unexpectedly exited. Status code was: 127」
という、エラーが出てしまい、うまく起動ができません。
2〜3日ほど調べていますが解決策が見つからず困っています。
どうしたら起動できるようになるでしょうか。
尚、MacOSのターミナル上では、Notebookから「.py」ファイルに変換したファイルを使うことで
起動ができます。こちらでは特に問題ないのですが・・・
環境:
MacOS Sierra v10.12.6
JupyterLab v0.35.4 (Notebook上にてプログラミング)
実行しているコード
from selenium import webdriver import chromedriver_binary driver = webdriver.Chrome()
エラー内容
--------------------------------------------------------------------------- WebDriverException Traceback (most recent call last) <ipython-input-28-97388813b172> in <module> 1 from selenium import webdriver 2 import chromedriver_binary ----> 3 driver = webdriver.Chrome() ~/anaconda3/lib/python3.7/site-packages/selenium/webdriver/chrome/webdriver.py in __init__(self, executable_path, port, options, service_args, desired_capabilities, service_log_path, chrome_options, keep_alive) 71 service_args=service_args, 72 log_path=service_log_path) ---> 73 self.service.start() 74 75 try: ~/anaconda3/lib/python3.7/site-packages/selenium/webdriver/common/service.py in start(self) 96 count = 0 97 while True: ---> 98 self.assert_process_still_running() 99 if self.is_connectable(): 100 break ~/anaconda3/lib/python3.7/site-packages/selenium/webdriver/common/service.py in assert_process_still_running(self) 109 raise WebDriverException( 110 'Service %s unexpectedly exited. Status code was: %s' --> 111 % (self.path, return_code) 112 ) 113 WebDriverException: Message: Service chromedriver unexpectedly exited. Status code was: 127
下記のような回答は推奨されていません。
このような回答には修正を依頼しましょう。