URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)>

これはPythonが管理している証明書が古いためSSLの通信に失敗する。 Pythonをインストールしたら以下のコマンドを実行して最新の証明書を取得すると良い。

$ /Applications/Python\ 3.9/Install\ Certificates.command
/Applications/Python\ 3.9/Install\ Certificates.command
 -- pip install --upgrade certifi
Collecting certifi
  Using cached certifi-2020.12.5-py2.py3-none-any.whl (147 kB)
Installing collected packages: certifi
Successfully installed certifi-2020.12.5
WARNING: You are using pip version 20.2.3; however, version 20.3.3 is available.
You should consider upgrading via the '/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -m pip install --upgrade pip' command.
 -- removing any existing file or link
 -- creating symlink to certifi certificate bundle
 -- setting permissions
 -- update complete