LoginSignup
2
1

More than 5 years have passed since last update.

pip3 install したらSSLエラーになった(MacOS環境)

Posted at

概要

OpenStreetMapからネットワークデータを取得するためのPythonライブラリである「OSMnx」が必要となりました.そのためpip3 -installをMacOS上で実行したところ以下のようなエラーが生じました.

Could not fetch URL https://pypi.python.org/simple/osmnx/: There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:645) - skipping
  Could not find a version that satisfies the requirement osmnx (from versions: )
No matching distribution found for osmnx

解決方法

結論

結論から言うと「Macでpip install -U pipがSSLエラーになる(Lean Engineer)」より以下のコマンドを実行したところエラーが表示されなくなりました.

curl https://bootstrap.pypa.io/get-pip.py | python3

理由(推測)

エラーコードの中に「There was a problem confirming the ssl certificate:」つまりSSL証明書の確認に問題があると記載されています.
SSL証明書が古く上記コマンドでpipをアップデートしたことにより新しくなったためエラーが出なくなったと考えられます.

2
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
2
1