概要
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をアップデートしたことにより新しくなったためエラーが出なくなったと考えられます.