我已经通过Homebrew安装了Python 3.8和3.9:
~ brew list | grep python
python@3.8
python@3.9
我想使用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
我试图卸载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?
python3
,并没有添加python
链接。我不得不进入并切割我的.bashrc
和.profile
来编辑我的$PATH
,因为一些插入物使其变得混乱,可能是由于之前的安装,然后在/opt/homebrew/bin
中添加一个python
符号链接到我想要的python3
旁边的python3
符号链接。 - NeilGswitch
了。也许我们可以更新问题和答案? - undefined