Macbook に入っていた Python がすでにサポート対象外となっている Python2 系だったので、Python3 系をインストールしたいと思います。
1. Python3 インストール用ファイルのダウンロード
Python のダウンロードページへアクセスし、ダウンロードリンクをクリック。

2. Python3 のインストール
ダウンロードしたファイルをクリックするとインストーラが起動します。基本的には「続ける」をクリックしていけば問題ありません。




Python のインストール先を指定します。

「インストール」をクリック


無事インストールが完了しました。

今回インストールされたのは Python 3.8。

3. 証明書のインストール
Python フォルダ内にある Install Certificates.command をダブルクリックし、証明書をインストールします。

ターミナルが起動し証明書のインストールが始まります。
Last login: Sun May 17 19:09:43 on ttys000 ~ % /Applications/Python\ 3.8/Install\ Certificates.command ; exit; -- pip install --upgrade certifi Collecting certifi Downloading https://files.pythonhosted.org/packages/57/2b/26e37a4b034800c960a00c4e1b3d9ca5d7014e983e6e729e33ea2f36426c/certifi-2020.4.5.1-py2.py3-none-any.whl (157kB) |████████████████████████████████| 163kB 635kB/s Installing collected packages: certifi Successfully installed certifi-2020.4.5.1 WARNING: You are using pip version 19.2.3, however version 20.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command. -- removing any existing file or link -- creating symlink to certifi certificate bundle -- setting permissions -- update complete [プロセスが完了しました]
4. 動作確認
ターミナルで「python3」と入力すると Python3 を開始できます。「python」と入力すると mac にデフォルトで入っている旧バージョンの python が起動するので注意してください。
~ % python3 Python 3.8.3 (v3.8.3:6f8c8320e9, May 13 2020, 16:29:34) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>>
試しに「print("hello world")」と入力すると、下記の通り「hello world」と表出されました。
>>> print("hello world") hello world >>>
というわけで、Python3 を使用できる状態となりました!