如何在 Mac 自制软件上更新 python3

mer*_*lin 4 python macos homebrew

我在我的 mac (10.15.4) 上的 python 旁边运行 python3。老实说,我不太清楚几年前我是如何安装的。我的猜测是自制的。现在我想更新到最新版本。我怎么做?

user@192-143-0-9 ~ % python --version
Python 2.7.16
user@192-143-0-9 ~ % python3 --version
Python 3.7.1
user@192-143-0-9 ~ % brew update
error: gc died of signal 9
Fast-forwarded master to origin/master.
Updated 1 tap (homebrew/core).
Run Code Online (Sandbox Code Playgroud)

截至本文发布时,python3 的版本为 3.8.2,这是我想要升级到的版本。如何才能实现这一目标?

mer*_*lin 7

这为我解决了这个问题:

% brew upgrade python3
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
phpunit

==> Upgrading 1 outdated package:
python3 3.7.1 -> 3.7.7
...
% python3 -V
Python 3.7.7
Run Code Online (Sandbox Code Playgroud)