0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

pip install chromedriver-binary が ssl.SSLCertVerificationError で失敗したときの解決方法

Last updated at Posted at 2021-10-18

はじめに

pip install chromedriver-binary コマンドを実行したとき、 ssl.SSLCertVerificationError エラーで失敗したため解決手順をメモします。

再現環境

  • MacOS 11
  • Python 3.9.6
  • pip 21.2.4

エラー時のログ

$ pip install chromedriver-binary
Collecting chromedriver-binary
  Using cached chromedriver-binary-95.0.4638.17.0.tar.gz (4.8 kB)
Building wheels for collected packages: chromedriver-binary
  Building wheel for chromedriver-binary (setup.py) ... error
  ERROR: Command errored out with exit status 1:
  (中略)
  running bdist_wheel
  running build
  running build_py
  
  Downloading Chromedriver...
  
  Traceback (most recent call last):
    File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 1346, in do_open
  (中略)
  ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)

ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate とあるので、証明書検証時のエラーらしい。

解決方法

エラーメッセージをググったところ、次のコマンドを実行すればいいとのこと(以下 MacOS の場合)。

/Applications/Python\ 3.9/Install\ Certificates.command

上のコマンドを実行後、再び pip install chromedriver-binary を実行したところ無事インストールできました。

参考

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?