pythonにてgoogle chromeを自動で作動させたいのですが、chrome driver binaryをインストールすることができません。
以前は、ターミナルにて「pip install chromedriver-binary==101.0.4951.41.0」でインストールできていたのですが先日、google chromeの更新に合わせて、chrome driver binaryをターミナルでインストールしようとしたところ、以下のようなメッセージ※が出てきてしまいました。
文面を見るとwheelや、pipではなくパッケージの問題、等の文言が出てきており、wheelの仕組み等色々調べてみたのですが、原因がわかりません。ご教授いただけますと幸いです。
当方、プログラミング初心者であり、理解できていない部分が多々ありますが、よろしくお願いします。
使用PCはmacです。
※
_Collecting chromedriver-binary==101.0.4951.41.0
Using cached chromedriver-binary-101.0.4951.41.0.tar.gz (4.9 kB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: chromedriver-binary
Building wheel for chromedriver-binary (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [78 lines of output]
running bdist_wheel
running build
running build_py
Downloading Chromedriver... Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1317, in do_open encode_chunked=req.has_header('Transfer-encoding')) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1244, in request self._send_request(method, url, body, headers, encode_chunked) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1290, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1239, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1026, in _send_output self.send(msg) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 966, in send self.connect() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1414, in connect server_hostname=server_hostname) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 423, in wrap_socket session=session File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 870, in _create self.do_handshake() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 1139, in do_handshake self._sslobj.do_handshake() ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/private/var/folders/9n/yr6syrjn5jj5fg8vb65hbfyr0000gn/T/pip-install-95sojbiu/chromedriver-binary_5edaa8c19bbd4b1683af874bd7f584e5/setup.py", line 44, in run response = urlopen(url) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 222, in urlopen return opener.open(url, data, timeout) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 525, in open response = self._open(req, data) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 543, in _open '_open', req) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 503, in _call_chain result = func(*args) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1360, in https_open context=self._context, check_hostname=self._check_hostname) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1319, in do_open raise URLError(err) urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076)> During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<string>", line 36, in <module> File "<pip-setuptools-caller>", line 34, in <module> File "/private/var/folders/9n/yr6syrjn5jj5fg8vb65hbfyr0000gn/T/pip-install-95sojbiu/chromedriver-binary_5edaa8c19bbd4b1683af874bd7f584e5/setup.py", line 84, in <module> cmdclass={'build_py': DownloadChromedriver} File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/__init__.py", line 145, in setup return distutils.core.setup(**attrs)
中略
File "/private/var/folders/9n/yr6syrjn5jj5fg8vb65hbfyr0000gn/T/pip-install-95sojbiu/chromedriver-binary_5edaa8c19bbd4b1683af874bd7f584e5/setup.py", line 48, in run raise RuntimeError('Failed to download chromedriver archive: {}'.format(url)) RuntimeError: Failed to download chromedriver archive: https://chromedriver.storage.googleapis.com/101.0.4951.41/chromedriver_mac64.zip [end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for chromedriver-binary
Running setup.py clean for chromedriver-binary
Failed to build chromedriver-binary
Installing collected packages: chromedriver-binary
Running setup.py install for chromedriver-binary ... error
error: subprocess-exited-with-error
× Running setup.py install for chromedriver-binary did not run successfully.
│ exit code: 1
╰─> [80 lines of output]
running install
running build
running build_py
Downloading Chromedriver... Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1317, in do_open encode_chunked=req.has_header('Transfer-encoding'))
中略
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 1139, in do_handshake self._sslobj.do_handshake() ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/private/var/folders/9n/yr6syrjn5jj5fg8vb65hbfyr0000gn/T/pip-install-95sojbiu/chromedriver-binary_5edaa8c19bbd4b1683af874bd7f584e5/setup.py", line 44, in run response = urlopen(url) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 222, in urlopen return opener.open(url, data, timeout) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 525, in open response = self._open(req, data)
中略
raise URLError(err) urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076)> During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<string>", line 36, in <module> File "<pip-setuptools-caller>", line 34, in <module> File "/private/var/folders/9n/yr6syrjn5jj5fg8vb65hbfyr0000gn/T/pip-install-95sojbiu/chromedriver-binary_5edaa8c19bbd4b1683af874bd7f584e5/setup.py", line 84, in <module> cmdclass={'build_py': DownloadChromedriver} File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/__init__.py", line 145, in setup return distutils.core.setup(**attrs) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/core.py", line 148, in setup dist.run_commands()
中略
raise RuntimeError('Failed to download chromedriver archive: {}'.format(url)) RuntimeError: Failed to download chromedriver archive: https://chromedriver.storage.googleapis.com/101.0.4951.41/chromedriver_mac64.zip [end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> chromedriver-binary
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure._
あなたの回答
tips
プレビュー