【发布时间】:2021-01-29 10:02:25
【问题描述】:
我通过 Homebrew 安装了 Python 3.8 和 3.9:
~ brew list | grep python
python@3.8
python@3.9
我想通过python3 命令使用Python 3.9 作为我的默认版本。我尝试了以下方法:
~ brew switch python 3.9
Error: python does not have a version "3.9" in the Cellar.
python's installed versions: 3.8.6
我试图卸载 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
如何使用 Python 3.9?
【问题讨论】:
-
@Tom 你确定它在这里适用吗? Python 2 和 Python 3 是独立的包。