我已将我的 python 3 更新到最新版本 3.8:
brew search python
==> Formulae
app-engine-python gst-python python ? python@3.8 ?
boost-python ipython python-markdown wxpython
boost-python3 micropython python-yq
==> Casks
awips-python kk7ds-python-runtime mysql-connector-python
Run Code Online (Sandbox Code Playgroud)
但是当我在我的 mac 上检查 python3 版本时,它仍然显示 3.7:
python3 --version
Python 3.7.6
Run Code Online (Sandbox Code Playgroud)
如何使用 Homebrew 将 python3 默认为最新的 3.8 版本?
编辑:当我尝试使用时brew switch,它告诉我我只安装了 python 3.7.6,但最后brew upgrade我很确定它python3.8.1是用 Homebrew 安装的
brew switch python 3.8.1
python does not have a version "3.8.1" in the Cellar.
python's installed versions: 3.7.6_1
Run Code Online (Sandbox Code Playgroud)