【发布时间】:2023-12-23 23:15:01
【问题描述】:
以前,我有这个:
$ python # version 2.7.x
$ python3 # version 3.6.x
这工作正常。我犯了一个愚蠢的错误,试图修复一些没有损坏的东西,然后我运行了这些:
brew install python@2
brew install python@3
我在想这会做到这一点:
$ python2 # version 2.7.x
$ python3 # version 3.6.x
但实际上它所做的是:
$ python2 # doesn't exist, damnit
$ python # version 3.6.x
我正在寻找的最终结果:
$ python # version 2.7.x
$ python2 # version 2.7.x
$ python3 # version 3.6.x
事实上,如果可能的话,最好在版本 2/3 之间切换 $python。如何在 MacOS 上执行此操作?
【问题讨论】:
标签: python python-3.x python-2.7 homebrew