我通过 Homebrew 安装了 Python 3.8 和 3.9:
~ brew list | grep python
python@3.8
python@3.9
Run Code Online (Sandbox Code Playgroud)
我想使用 Python 3.9 作为我的默认python3命令。我尝试了以下方法:
~ brew switch python 3.9
Error: python does not have a version "3.9" in the Cellar.
python's installed versions: 3.8.6
Run Code Online (Sandbox Code Playgroud)
我试图卸载 Python 并重新安装它,但它被其他软件包使用:
~ brew uninstall python
Error: Refusing to uninstall /usr/local/Cellar/python@3.8/3.8.6
because it is required by glib and php, which are currently installed.
You can override this and force removal with:
brew uninstall --ignore-dependencies python
Run Code Online (Sandbox Code Playgroud)
如何使用 Python 3.9?